PostgreSQL vs MySQL for GDPR and EU data residency: which side fits your requirement
For a team that must meet GDPR and has both engines on its shortlist, the residency and GDPR duties sit with the operator of the self-hosted server, and neither PostgreSQL nor MySQL changes that. Both run inside your own infrastructure, so the hosting region, your controller or processor role, the security of processing under Article 32 and any transfer analysis under Chapter V stay with your organization whichever engine you choose. PostgreSQL has no vendor data processing agreement for the open source project, so confirm whether any agreement applies to the MySQL edition and track you deploy. The engine decides how much control work you must build and document, but it does not decide where the data lives or who is accountable for it. Start by recording where each database host runs, who operates it, and which personal data it holds.
Choose PostgreSQL when you want a permissive license for the core server and are ready to assemble the controls yourself. The PostgreSQL License is similar to the BSD and MIT licenses. The controls you configure are TLS for client connections, which the PostgreSQL SSL documentation covers, storage encryption through the options in the encryption guide, role-based access, and server logging through the runtime logging parameters. Detailed records of who read or changed personal data are usually added with the pgAudit extension, so confirm its compatibility with your PostgreSQL major version before you rely on it. Check that ssl is enabled, that pg_hba.conf admits personal data databases only over TLS, and that log retention matches your policy. Confirm how multifactor authentication for administrator logins will be enforced at your identity layer, because the core server does not provide it on its own.
Where personal data sits in a self-hosted database deployment
The diagram starts at the application tier, which sends queries to the primary server inside the EU trust boundary. The standby receives replication, and the backup store and log sink receive copies of personal data. Three paths leave the region: offsite backup copies, logs sent to a hosted log service, and administrator sessions from outside the EU. Each one is a transfer question under Chapter V of the GDPR, so check the destination, the safeguards and who can reach the data. The vendor has no data path for self-hosted community software, because the data stays wherever the operator runs it. Confirm that against your own network controls and access logs.
EU-hosted primary, standby, backups and logs, with paths that leave the region flagged.
What GDPR asks of a database you run yourself
Chapter IV (Articles 24 to 43) places the duties on the controller, who must be able to show that processing complies, and on any processor that runs the system for the controller. Where you run the database for your own purposes, you are usually the controller, and an outside operator may be a processor, so confirm that allocation with counsel. Article 32 is where the database itself is judged. It asks for measures proportionate to the risk, including encryption and pseudonymisation where suitable, and for the ability to keep confidentiality, integrity, availability and resilience of processing systems, to restore access to personal data after an incident, and to test those measures on a regular basis. For PostgreSQL, an assessor will look at the PostgreSQL SSL documentation for client connections, at-rest encryption through the filesystem or volume, and the logging settings such as log_connections and log_statement. Check each one against your own risk assessment before you describe it as compliant.
Articles 33 and 34 turn database events into a notification clock. Article 33 requires the controller to notify the competent supervisory authority of a personal data breach within the deadline the article sets, and Article 34 covers informing affected individuals when the risk to them is high. The database team needs evidence that can answer what was read, changed or exported, and when. Decide now who makes the notification call, who holds the audit trail, how long it is kept, and whether it can be queried without a rebuild. On MySQL, confirm in the MySQL 8.4 audit log documentation which edition includes the audit log you plan to use, and test that it records the events your breach procedure depends on. On PostgreSQL, the equivalent is usually an extension such as pgAudit, which you must install, configure and maintain yourself.
Article 83 sets the ceiling. Infringements of Articles 25 to 39 carry maximum fines of EUR 10 million or 2% of total worldwide annual turnover, and infringements of the principles, lawful basis, data subject rights and transfer rules carry maximum fines of EUR 20 million or 4%, whichever is higher in each case. Under Article 51, independent national supervisory authorities enforce the regulation, so which authority reviews your database depends on where you are established and where the data subjects are, and counsel should confirm that. The Regulation (EU) 2016/679 on EUR-Lex has applied since 25 May 2018 under Article 99. Database versions matter to this assessment. PostgreSQL 14 support runs to November 12, 2026, and today it is past that date, so any 14 cluster still in service needs a dated upgrade plan, which is hard to justify under Article 32 otherwise.
How PostgreSQL and MySQL meet Articles 32 to 34 as documented
This table sets the GDPR security and data location controls that a self-managed PostgreSQL or MySQL 8.4 Community server must support against what each engine documents. Read each cell as two parts: what the documentation provides, and what the operator still has to configure and evidence. The main takeaway is that neither engine supplies a vendor data processing agreement for the community software, so the controller or processor duties and the hosting location stay with your organization.
| Control | PostgreSQL (self-managed) | MySQL 8.4 Community (self-managed) |
|---|---|---|
| Encryption in transit | Documented in the SSL TCP/IP page: TLS on client connections. Operator: turn on ssl, install certificates, require hostssl rules. | Documented in the encrypted connections page: TLS for client sessions. Operator: provision certificates and require TLS for accounts that need it. |
| Encryption at rest | Documented in the encryption options page: disk and column-level approaches. Operator: choose, configure and manage keys for filesystem or disk encryption. | Documented in the InnoDB data encryption page: tablespace encryption using a keyring. Operator: configure the keyring and encrypt the tablespaces. |
| Access control | Documented: role privileges and host-based authentication rules. Operator: design roles, restrict network access and rotate credentials. | Documented in the roles page: role-based privileges for accounts. Operator: define least-privilege roles, review grants and restrict account hosts. |
| Audit logging | Documented in the logging page: connection and statement logging settings. Auditing comes from the separate pgAudit extension. Operator: install, configure and ship logs. | Documented in the audit log page. Confirm which audit log capability your build includes before design. Operator: enable it, set retention and protect log files. |
| Multifactor authentication | Confirm in the PostgreSQL docs for your version. Operator: enforce MFA at the bastion, VPN or SSO layer before the database login. | Documented in the multifactor authentication page: multiple authentication factors per account. Operator: enable it for admin accounts and confirm supported plugins. |
| Data location | Self-hosted, so data stays where the operator runs it. Operator: choose region, backup and replica locations and document them. | A self-managed server keeps data where the operator runs it. Operator: choose hosting region, backup and replica locations and document transfers. |
| Vendor agreement | No vendor DPA for the open source project. Operator: document the controller or processor role and sign terms with any hosting or support provider. | No vendor DPA for Community Edition. Operator: carries controller or processor duties and agrees terms with any hosting or support provider. |
Evidence a GDPR assessor asks for and how each engine produces it
PostgreSQL evidence is mostly files and query output from the server itself. Core settings cover TLS and connection logging, while the per-statement audit trail depends on an extension you install and load.
- TLS enforcement:
ssl = oninpostgresql.confandhostssllines inpg_hba.conf, withSELECT ssl FROM pg_stat_ssl WHERE pid = pg_backend_pid();as session proof. See the SSL guide. - At-rest encryption: Confirm in the encryption options guide which layer your version covers, then supply volume or filesystem encryption records from the platform team.
- Audit log samples:
logging_collector,log_directoryandlog_connectionsproduce the server log. Per-statement records need pgAudit, an extension that depends on installation andshared_preload_libraries. - Roles and MFA: Export
\duandpg_rolesalongsidepg_hba.conf. Core PostgreSQL does not enforce MFA, so evidence for it comes from your external authentication layer. - Version records:
SHOW server_version;matched to the support table. Version 14 support ends November 12, 2026, so a cluster still on 14 is past its window on this page's date.
Pull these from the server itself, since ALTER SYSTEM writes postgresql.auto.conf and included files can override a documented setting.
MySQL evidence comes from the server option file, the mysql schema and the status variables. Several controls depend on the release track, the keyring component or the edition, so confirm each one against the build you run.
- TLS enforcement:
require_secure_transport = ONwithssl_certandssl_keyin the option file, verified bySHOW SESSION STATUS LIKE 'Ssl_cipher';from a client. Keep the encrypted connections guide with the output. - At-rest encryption: Tablespace encryption depends on a keyring component available in your build. Use
ENCRYPTIONininformation_schema.INNODB_TABLESPACESas proof per table, and confirm availability before the data map promises it. - Audit log and retention: The audit log reference covers the audit trail. Mark it as edition-dependent until Oracle confirms it for your build, and show retention through
binlog_expire_logs_secondsandlog_erroroutput. - Roles and MFA: Export
SHOW GRANTSper account andmysql.role_edgesfor role membership. For MFA, query account definitions for second-factor settings, which depend on the 8.4 plugin in your build. - Version records:
SELECT VERSION();plus the release track. 8.4 is an LTS series, while Innovation builds are supported only until the next Innovation release, so the record needs an upgrade date.
Ask Oracle which features your Community build includes, and keep that answer beside the configuration output so the assessor sees which build produced the evidence.
Some items sit outside the database engine and look the same for either choice. The organization owns them, so an assessor will test the records as much as the software.
- Data map with locations: Every primary, replica, backup and log store with its hosting region, operator and controller or processor role. Tie each entry to the controls under Article 32.
- Transfer register: Each path outside the EU, including remote support, offsite backups and log shipping, with the Chapter V mechanism under Articles 44 to 50. An empty register needs a written reason.
- Breach runbook: Steps for detection from the logs above, severity assessment, notice to the supervisory authority under Article 33 and to affected people under Article 34. Test it as a tabletop exercise.
- Backup and restore records: The backup location and region, encryption and retention settings, plus dated restore tests showing the restored database works.
- Patch register: Each engine mapped to its support end date, patch dates and planned upgrade, so the assessor sees current status.
Give each item an owner and a review date, since an undated register is hard to defend in an assessment.
What EU data residency means under GDPR Chapter V
Chapter V of the GDPR (Articles 44 to 50) governs transfers of personal data to third countries, so residency is a question about every place the data is stored, processed, backed up and accessed, including by support staff and the tools they use. The database engine does not answer that question. Both PostgreSQL and MySQL are self-hosted in this scenario, so the hosting region is whatever the operator chooses for the cluster, and the operator carries the controller or processor duties that come with that choice. An EU primary in Frankfurt (illustrative) means little if a replica, an export or a log stream lands somewhere else.
The places that usually decide the answer sit around the database. Offsite backups, WAL archives for PostgreSQL and binary log copies for MySQL can be shipped to object storage in another region by a script nobody revisits. Logs need the same scrutiny. PostgreSQL's logging settings control what reaches the server log, and MySQL's audit log events often flow into a central collector, so confirm where each collector runs. Remote administration matters too. A support engineer's session, a jump host in another country or an SSH tunnel opened from a laptop abroad can all count as access from a third country, so list who can open a session to the cluster and from where. Check these paths against the PostgreSQL error reporting and logging documentation and your own runbooks.
Ask counsel to confirm the transfer analysis for your own architecture before you rely on any region choice. Counsel will want a written map of every copy and every access path: primary and replica sites, backup targets and their retention, log and metrics pipelines, ticketing or chat tools that receive database output, and the identity of anyone with administrative access, including staff located outside the EU. Where data or access leaves the EU, the analysis has to show which Chapter V mechanism applies, and that answer follows from your data flows, whichever engine you picked. The text of the regulation is available in EUR-Lex's copy of Regulation (EU) 2016/679, which is the starting point for that review.
Configuring the chosen engine for GDPR and EU data residency controls
This sequence sets up the chosen engine as a documented, region-bound database that a compliance team can review against the security of processing duties in Article 32 of the GDPR. Each step names the PostgreSQL and MySQL branch where the setup differs, and the sequence ends with the evidence pack an assessor will ask for.
Fix and document the processing region
The team that owns the database, usually platform engineering working with the data protection lead, names the country or EU region where the primary, replicas, backups and privileged support access will sit. Both engines are self-hosted, so the operator chooses the hosting region and carries controller or processor duties under Regulation (EU) 2016/679. Record the region in the data processing records and the data flow map, then encode it in infrastructure as code, VM or Kubernetes placement rules and cloud account settings so no later change moves data outside it. Output: a signed region statement that matches the deployed topology.
Enforce encrypted client connections
Turn on TLS for every client path before any personal data is loaded. On PostgreSQL, set ssl to on in postgresql.conf and allow only hostssl entries in pg_hba.conf, following the secure TCP/IP connections documentation for certificate and cipher settings. On MySQL 8.4, install the server certificates, follow the encrypted connections page, and set require_secure_transport to ON for accounts that touch personal data. Confirm that any load balancer or proxy in front of the database either keeps TLS end to end or documents where it ends. Output: a test log showing a plaintext connection attempt refused on each engine.
Enable encryption at rest by documented method
Use the encryption method the engine documents for your version, and verify each layer instead of assuming one. The PostgreSQL encryption options page sets out the choices, and teams commonly encrypt the data volumes at the storage or filesystem layer, which the platform team must verify and document. On MySQL 8.4, the InnoDB data encryption page describes tablespace encryption that depends on a keyring component, so confirm which keyring you will run, where its keys are held, and whether encryption covers existing tables as well as new ones. Output: an encryption configuration record and a check showing the data directory and keyring state.
Configure audit logging and log retention
Decide what is recorded and who reads it. On PostgreSQL, the logging parameters on the error reporting and logging page control connection and statement logging, and the pgAudit extension adds session and object auditing; check its compatibility with your PostgreSQL major version before installing it. On MySQL, the audit log page describes the audit log facility, and you should confirm with Oracle whether the audit log plugin is available in the edition and distribution you deploy before you design around it. For both engines, ship logs to a store outside the database host and record the retention period in a rule signed by the data owner. Output: sample access events from a test user and the signed retention rule.
Set roles and multifactor authentication
Create named roles for application, migration, read-only reporting and administration, and grant each only the privileges it needs. On PostgreSQL, use CREATE ROLE and GRANT, and note that the server does not document a native second factor at login, so teams usually enforce it at a bastion host or identity layer that you must design and test. On MySQL 8.4, define roles with the roles feature and enable the multifactor authentication described on its documentation page for administrative accounts, checking the factor limits there. Remove shared and default accounts on both engines. Output: an exported list of roles and grants, plus a login test showing the second factor required for administrators.
Pin a supported series and set a patch cadence
Choose a major or LTS series that is inside its support window on the go-live date, and put its end-of-support date in the change calendar. The PostgreSQL versioning policy lists support for 15 until November 11, 2027, 16 until November 9, 2028, 17 until November 8, 2029 and 18 until November 14, 2030, while 14 ends November 12, 2026, so a new deployment should not start on 14. On MySQL, the Community Server download page lists 9.7.2 LTS and 8.4.11 LTS, and Oracle's Lifetime Support Policy gives LTS series 5 years of premier and 3 years of extended support, according to the MySQL 8.4 reference manual. Innovation releases are supported only until the next Innovation release, so pin an LTS series for personal data. Output: a pinned version record and a written patch calendar.
Place and test backups in the approved region
Keep base backups, WAL or binary log archives and replicas inside the region fixed in the first step, and encrypt them with keys governed by the same access controls as the live data. Name the backup tool in the runbook, since neither engine's supplied documentation prescribes one for your environment, and confirm it can write only to approved storage. Run a full restore into an isolated environment in the same region, time it against the recovery targets the data owner has agreed, and confirm that the restore path cannot pull data from a region outside the approved list. Output: a restore test record showing the date, operator, source and target region, and checksum results.
Assemble the evidence pack
Gather the artifacts an assessor will ask for into one controlled folder: the region statement, the TLS configuration and refused-connection test, the encryption record, audit samples and the retention rule, role and grant exports, the MFA test, the version and patch calendar, and the backup and restore records. Map each artifact to the GDPR provision it supports, mainly Article 32 on security of processing, and to the breach-notification duties in Articles 33 and 34, which depend on logs you can actually produce. Have the data protection lead and an internal reviewer sign the pack and keep it under change control. DeployOpen can prepare this evidence, but independent auditors and supervisory authorities make the assessment, and DeployOpen does not issue audit reports or certifications.
What buyers ask before hiring help with GDPR database work
How much effort does GDPR database work take?
Effort is set by four drivers you can count before work starts: the number of databases that hold personal data, the controls already in place, the complexity of regions and transfer paths, and the size of the evidence gaps. No single figure applies to every organization. Start with an inventory of each database, the data categories it holds, where it runs and who can reach it. Illustrative example: a team with one primary database and audit logging already enabled usually has less to close than a team with a dozen databases, replicas in two regions and no access records. Ask any provider to show how each driver feeds the estimate, so you can see which inputs would move the effort up or down.
How long does a GDPR database engagement take to finish?
The timeline comes from the written scope. Scope, deliverables and dates are agreed in writing before work starts, and most engagements are fixed-scope, so the schedule follows those agreed items. Delays usually come from outside the scope document: the inventory finds more databases than expected, access to systems or staff arrives late, or a control needs a change and a retest. Ask for the milestones, what each one depends on from your side, and what happens if a dependency slips. Ongoing support, upgrades and continuous testing run as separate retainers, so keep them out of the project timeline when you compare quotes.
What must our security, platform, legal and data protection staff provide?
Four groups supply inputs that the work cannot produce alone:
- Security: access to the environment, existing control evidence and an owner for hardening and logging decisions.
- Platform: host and network details, backup targets, maintenance windows and change approval.
- Legal: the lawful basis and transfer position the organization has already recorded.
- Data protection: the record of processing, data categories, retention rules and the breach procedure.
Name an owner and a date for each input in the scope, because missing inputs usually show up later as rework.
Can an internal team run GDPR database work without outside help?
Yes, an internal team can do it alone if it has the skills and time, so the question is whether those skills exist in-house. The work draws on PostgreSQL or MySQL administration, TLS and encryption configuration, audit logging, role-based access control, backup and restore testing, and enough privacy knowledge to map personal data to systems. Check whether staff have changed these settings on production databases before, whether they can be spared for the full project, and who will run the controls afterward. Teams that lack one of these skills often bring in outside help for that part only. DeployOpen, for example, plans, implements and hardens self-hosted platforms inside your own infrastructure, so a partner can cover a technical gap while your staff keep ownership of governance decisions.
What should a GDPR database quote itemize before you sign?
A quote should show what you are paying for, item by item:
- Scope: the databases, environments, regions and data categories covered.
- Deliverables: each document, configuration baseline, test report and evidence set.
- Client inputs: the access, records and decisions the plan depends on, with named owners.
- Testing: what is tested, and whether a retest after fixes is included.
- Handover: documentation, knowledge transfer and what is supported after go-live.
- Exclusions: work explicitly out of scope, so gaps are visible before signing.
Show separate retainers for ongoing support, upgrades and continuous testing as their own line, because they recur. DeployOpen does not publish a price list. A quote follows from the written scope, so ask for each item to be priced or marked as included.
Does DeployOpen certify that our databases are GDPR compliant?
No. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports, attestations or certifications. GDPR is enforced by independent national supervisory authorities, and the European Data Protection Board resolves disputes between them through binding decisions, so conclusions about compliance come from those regulators or from the independent assessors your organization engages. The useful question is what evidence the work produces: configuration records, encryption and TLS settings, audit logging, access control reviews, backup and restore tests and a documented data map. Read the GDPR text on EUR-Lex with your data protection lead, and ask any provider which artifacts it will hand over and in what form.
Why supported versions count as GDPR evidence
Running an engine that no longer receives security fixes weakens your position under Article 32, the GDPR article on security of processing, because an assessor will ask whether the measures you chose still cover known weaknesses. The PostgreSQL versioning policy sets these windows: version 14 is supported until November 12, 2026, a date that has already passed, so any cluster still on 14 is outside support today; version 15 until November 11, 2027; version 16 until November 9, 2028; version 17 until November 8, 2029; and version 18 until November 14, 2030. Versions 13 and earlier are unsupported. Minor releases arrive at least every three months, so set a fixed patch cadence and record each minor upgrade as evidence.
Moving off an unsupported series is a planned project that needs a test run first. PostgreSQL's upgrade documentation lists pg_dumpall with a restore, pg_upgrade, and logical replication, and each route trades downtime, rollback options and operator effort differently, so rehearse the chosen route on a copy of production. For MySQL Community Server, the LTS track falls under the Oracle Lifetime Support Policy, which the MySQL 8.4 reference manual describes as five years of premier support and three years of extended support. The Innovation track is supported only until the next Innovation release, so it suits teams that can upgrade on short notice. The download page currently lists 26.7.0 (Innovation), 9.7.2 LTS, 8.4.11 LTS and 8.0.46. A download listing shows which builds exist, so confirm the end date of each series with Oracle before you choose one.
Assessors usually ask for proof of what ran and when, so keep a dated inventory of every PostgreSQL and MySQL instance that holds personal data, recording the major version, minor version, track, support end date and named owner. Flag any instance whose end date falls within the period your review covers, such as a PostgreSQL 15 cluster that loses support on November 11, 2027, and attach a dated upgrade plan or a documented risk acceptance to each flag. For MySQL, record the track as well as the number, because an Innovation build may need replacing sooner than an LTS series. Ask your implementation partner to state in writing which series they will support during the engagement and who applies minor patches.
How DeployOpen helps prepare the database evidence
DeployOpen plans, implements, hardens, documents and supports self-hosted PostgreSQL or MySQL inside your own cloud accounts, data centers or air-gapped networks, so the data location is set by your environment. We prepare the database controls and evidence that a GDPR review will examine, while your compliance team, counsel and the relevant supervisory authority judge the result.
How we scope
- The written scope names the PostgreSQL or MySQL versions, hosting locations and regions in use.
- It lists which personal data sets sit in each database, and which backups, replicas and logs copy them.
- Engagements are fixed-scope, so deliverables and timelines are agreed in writing before work starts.
How we build
- Harden the database servers, including encrypted client connections and access controls, against the configuration the scope names.
- Confirm which audit logging each engine and edition includes, such as pgAudit for PostgreSQL, before relying on it.
- Map each database control to the evidence a reviewer will ask for, so gaps appear before the review.
How we hand over
- Written documentation covers data flows, configuration baselines, key and certificate ownership, and runbooks.
- The evidence pack lists the items agreed in the written scope, such as configuration exports and backup test records.
- Findings from testing are retested after fixes, so the handover describes the environment at delivery.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers, scoped separately from the project.
- Retainers can cover PostgreSQL minor updates, MySQL release changes and the evidence refresh before each review.
- Confirm with your DPO or counsel which GDPR duties stay with your organization as controller or processor.

