PostgreSQL data lifetime and harvest now decrypt later risk

PostgreSQL's documentation (checked 2026-12-03) describes no post-quantum feature, but the default TLS key exchange groups can be changed with ssl_groups, and a 2026 mailing-list message shows a hybrid ML-KEM group negotiating on PostgreSQL 18 with OpenSSL 3.5. Data that must stay confidential for years should be prioritized for review now.

On this page

Does PostgreSQL data need protection against harvest now, decrypt later?

The answer depends on how long your data must stay confidential, and the timing decision belongs to the data owner. As of 2026-12-03, the PostgreSQL 18 and 19 documentation describes no post-quantum feature. However, the server setting ssl_groups selects the TLS key exchange groups, and a hybrid ML-KEM group was shown to negotiate on PostgreSQL 18 built with OpenSSL 3.5, as a 2026-02-19 message on the pgsql-hackers list reports. The exposure is therefore set by the data and the link, not by the product alone.

Traffic on client connections and replication links can be recorded today and decrypted later if the key exchange relies on classical elliptic-curve groups. The default ssl_groups value, X25519:prime256v1, contains no post-quantum group. Data that must remain confidential for many years, such as personal records, health or financial data, trade secrets or long-lived identifiers, is the data most exposed to this pattern. Data that is public or expires within a short period carries less of that risk.

To judge your own exposure, ask the data owner how long each dataset must stay confidential, then trace which connections carry it. Include client connections, streaming and logical replication, pg_basebackup backups, and links to standby or analytics servers. The pg_basebackup documentation states that a base backup uses the same libpq connection security settings as other clients, so its transport protection is the same as any other connection. Confirm the ssl, ssl_groups and sslmode values in place on each server and client, and record whether any link uses GSSAPI encryption instead of TLS.

Before changing any group setting, confirm with the vendor and in your own test environment that the linked OpenSSL build supports the group you intend to use, and that every client in the path negotiates it. The documentation gives no client-side parameter for key exchange groups, so client support depends on the client library's own TLS stack. Record the decision, the data classes it covers and the date you made it, so the assessment can be reviewed when the data lifetime or the vendor guidance changes.

Which PostgreSQL versions and settings affect data lifetime exposure

This table compares PostgreSQL versions and the connection settings that decide how data in transit is protected, as checked on 2026-12-03. Read each row as a factual point to confirm in your own environment, since a hybrid key exchange group only applies when the server is built against an OpenSSL version that supports it and ssl_groups names it. The main takeaway is that data sent over connections today may stay readable for years, so the version and TLS settings in use determine how long that data needs to stay confidential.

ItemWhat the sources sayWhat to confirm
PostgreSQL 19Supported as of 2026-12-03; 19.0 first released 2026-11-19 (PG Versioning page).Confirm your minor release is current and that your support window covers the data retention period.
PostgreSQL 18Supported as of 2026-12-03; 18.7 first released 2025-09-25 (PG Versioning page).Confirm your minor release, since support for this major version runs on the published schedule.
PostgreSQL 14No longer supported as of 2026-12-03 (PG Versioning page).Plan an upgrade for any instance holding data that must stay confidential for years.
ssl_groups defaultX25519:prime256v1 in PostgreSQL 19 (PG Connection settings, 19). No post-quantum group is in the default.Check whether your deployment overrides ssl_groups in postgresql.conf.
Hybrid group exampleA pgsql-hackers message dated 2026-02-19 shows PostgreSQL 18 with ssl_groups set to X25519MLKEM768:X25519:prime256v1 negotiating X25519MLKEM768 over TLS 1.3 with OpenSSL 3.5 (PG hackers thread, 2026-02-19).This is one tested setup from a mailing list message, not documented product behavior; confirm your OpenSSL build supports the group.
Pre-18 versionsThe same message says versions before 18 rejected the ML-KEM group name in ssl_ecdh_curve, and asks about backporting; the thread contains no committer answer (PG hackers thread, 2026-02-19).Treat older versions as unable to use this path unless you confirm otherwise with the project.
libpq sslmode defaultprefer, which the documentation says makes no sense from a security point of view and is kept for backward compatibility; verify-full checks the CA chain and host name (PG libpq connection parameters).Set verify-full in client connection strings so server identity is checked.
Post-quantum documentationThe PostgreSQL 18 and 19 release notes and current server and libpq documentation, checked 2026-12-03, do not mention ML-KEM, ML-DSA or SLH-DSA (PG 18 release notes; PG 19 release notes).Ask the vendor or project for any post-quantum plan, since the documentation contains none.

How long data must stay confidential changes the priority

The first decision is how long each data class moving over PostgreSQL client connections and replication links must stay confidential. Data owners should set that period per class, for example customer records, payment-related fields, health data or internal configuration, and record it next to the connections that carry it. The reason is that recorded traffic can be decrypted later. An attacker who captures encrypted sessions today can keep them and attempt to read them once cryptanalytically relevant computers exist. The documentation gives no timeline for such computers, so the planning question is not when they arrive but whether a data class's confidentiality must outlast that unknown date.

The exposure sits in the key exchange of each recorded session, not in the stored data itself. On the server, ssl_groups (default X25519:prime256v1 in PostgreSQL 19) selects the groups offered for TLS key exchange, and ssl_min_protocol_version (default TLSv1.2) sets the lowest TLS version accepted. Every connection a long-lived data class uses should be checked for the groups and versions it negotiates. The current documentation shows no post-quantum group in these defaults. Any hybrid ML-KEM group depends on setting ssl_groups to a name the linked OpenSSL build supports, so confirm the OpenSSL version and build with your packaging team before planning around it.

Backups deserve the same period as the data they hold. A base backup made with pg_basebackup runs over a regular PostgreSQL connection using the replication protocol, so it uses the same libpq connection security settings as other clients, and the page lists no backup-encryption option. Treat each backup stream as carrying its data class's full confidentiality period. Ask the backup owner which sslmode and server settings apply to the replication link, and record the result per class. Where a class needs protection beyond what the link provides, the documentation points to file-system or block-level encryption by the operating system, which PostgreSQL does not replace.

Which PostgreSQL paths carry long-lived data

Long-lived data in PostgreSQL moves and rests along four separate paths: client connections, replication and base backups, backup manifests, and storage at rest. Each path is protected by different settings, and each needs its own confirmation in your deployment, because a control that secures one path does nothing for another.

Client connections secured by TLS

Client sessions carry queries, results and credentials, and PostgreSQL relies on OpenSSL for TLS rather than its own code. The server setting ssl defaults to off in the current documentation, so you must confirm it is on in your postgresql.conf. Key exchange is governed by ssl_groups, which defaults to X25519:prime256v1, and TLS 1.3 cipher suites by ssl_tls13_ciphers. On the client side, sslmode defaults to prefer, which the documentation calls insecure; confirm your applications use verify-full. Traffic recorded today could be decrypted later if it is captured now and the key exchange is not post-quantum, so the data's required confidentiality lifetime sets the priority for this path.

Connection settings docs

Streaming replication and base backups

Streaming replication and pg_basebackup both use the replication protocol over a regular PostgreSQL connection, so they inherit the same libpq security settings as other clients. Confirm that sslmode is set to verify-full in the connection string used by standby servers and backup jobs, not only in application configurations. The pg_basebackup page offers no backup encryption option and mentions no SSL or TLS settings of its own. A replica or backup set copied over a weakly secured link exposes the full database contents, so every replication host should be audited with the same key exchange and certificate checks as client connections.

pg_basebackup docs

Backup manifest checksums

pg_basebackup writes a backup manifest whose per-file checksum is chosen with --manifest-checksums, which accepts NONE, CRC32C, SHA224, SHA256, SHA384, SHA512 and defaults to CRC32C. The manifest always carries a SHA256 checksum of its own contents. The documentation states that CRC32C does not resist malicious changes, and checksums of any kind provide integrity, not confidentiality. A manifest therefore tells you a file is unchanged or damaged, but it does not hide the data. Do not treat it as a protection against harvest now decrypt later. Confirm which algorithm your backup jobs use, and treat the backup files themselves as data that needs confidentiality controls.

pg_basebackup docs

Storage at rest

The PostgreSQL encryption options page lists storage encryption only at the file system or block level, provided by the operating system, and does not mention transparent data encryption. The database itself therefore does not encrypt data files. Confirm which volume, disk or cloud storage encryption your data directory and backup storage use, how the keys for that encryption are held and rotated, and who can access them. The pgcrypto extension offers column-level functions, including PGP public-key encryption, but it is an application choice and its documented algorithms are not a substitute for a reviewed encryption design. Check the algorithms and key handling in your own deployment before relying on them for long-lived records.

Encryption options

How the priority differs for PostgreSQL 18, 19 and self-built servers

PostgreSQL 18 built against OpenSSL 3.5 or later, with ssl_groups set to include a hybrid group, is the one situation where the supplied facts show a post-quantum key exchange in use. A PostgreSQL developer's message dated 2026-02-19 shows PostgreSQL 18 with ssl_groups set to X25519MLKEM768:X25519:prime256v1 negotiating the hybrid group X25519MLKEM768 over TLS 1.3. That is a key exchange result for that test configuration, not a statement that the server is post-quantum secure overall.

  • Key exchange only: The hybrid group protects the key exchange. Certificates, signatures and client authentication are a separate question and are not established by this setting.
  • Default is not hybrid: The documented default for ssl_groups in PostgreSQL 19 is X25519:prime256v1, which contains no post-quantum group. Confirm the value on your own server rather than assuming the setting changed.
  • Version and library dependence: The facts tie the result to PostgreSQL 18 and OpenSSL 3.5 or later. Confirm the OpenSSL build linked to your server supports the group name you set.
  • Client side: The libpq connection parameters page documents no groups setting, so confirm which clients negotiate the group against your server.
  • Certificates unchanged: The facts do not cover the certificate types used in this configuration, so review ssl_cert_file and ssl_key_file separately.

Verify the negotiated group on a test connection to your own server before recording this configuration as in place.

How to set migration priority for PostgreSQL data

This sequence ranks PostgreSQL data by how long it must stay confidential, then checks whether each server and client path can carry that data over a connection that is ready for later migration. The result is a dated record that tells the team which databases to move first and which settings to confirm before they start.

  1. Classify data by confidentiality period

    The data owner, working with the security lead, groups each PostgreSQL database and table by how long the data must remain confidential after it is captured. Classes should be set by business and legal need, such as records that must stay secret for years versus short-lived session data, and the class should be written next to each database name. This step is done when every database in scope has one class and the data owner has signed the list. Anyone recording a class should name the source of that retention requirement, such as a contract, a regulation the organization follows, or an internal policy.

  2. Inventory versions and TLS settings per class

    The database administrator lists each PostgreSQL server that holds a data class, with its major version and the values of the ssl, ssl_min_protocol_version, ssl_max_protocol_version and ssl_ciphers settings. Recent PostgreSQL 19 documentation sets ssl to off by default, so the setting must be read from each server rather than assumed. The inventory is complete when every server appears once, with its version and TLS settings recorded next to its data class. Confirm each value against the running configuration, not the configuration file alone.

  3. Check ssl_groups and the linked OpenSSL version

    For each server, the database administrator records the value of ssl_groups and the OpenSSL version that the PostgreSQL build is linked against. The documented default in PostgreSQL 19 is X25519:prime256v1, which contains no post-quantum group, so a server that keeps the default is not using a post-quantum key exchange. Any group name that appears must be supported by the linked OpenSSL build, which the project's own thread shows for OpenSSL 3.5 with a hybrid group name. This step is done when each server's ssl_groups value and OpenSSL version are written in the inventory. Record the values as found, and do not treat a group name as enabled unless the server confirms it.

  4. Check client sslmode and libpq versions

    For each application or tool that connects on a path carrying classified data, the platform engineer records the libpq version it uses and the sslmode value in the connection string. The libpq default for sslmode is prefer, which the documentation calls insecure for server verification, so verify-full is the mode to confirm for paths that must check both the CA chain and the host name. The check is complete when every client path has a recorded libpq version and a sslmode value. Clients that connect through drivers or poolers should be listed separately, because their libpq version may differ from the server's.

  5. Confirm the PostgreSQL version is supported

    The security lead compares each server's major version with the project's support page, which lists PostgreSQL 19 and 18 as supported and PostgreSQL 14 as no longer supported as of 2026-12-03. Servers on an unsupported major version carry data that may need its own migration path, so they should be flagged for the owner to decide on upgrades. This step is done when each server's support status is recorded with the date of the check. Anyone repeating the check later should use the current versioning page, since support status changes over time.

  6. Record the migration priority and sign off

    The security lead combines the classification, inventory, TLS and client findings into one ranked list, placing servers that hold the longest-lived data and show the weakest settings first. Each entry should note the open items to confirm with the vendor or in the environment, such as whether a build supports the group names the team wants. The list is finished when the data owner and the security lead have both signed it and the check date is written on it. Keep the record with the inventory so that later reviews can see what changed.

Where recorded PostgreSQL traffic could be exposed

This diagram follows a client connection and a replication or pg_basebackup link from the client to the server over the network, then to the data at rest on disk. The key exchange point is negotiated from ssl_groups, which defaults to X25519:prime256v1 in PostgreSQL 19 and contains no post-quantum group. Check each hand-off: what key exchange the TLS session negotiated, what the base backup carries (the page documents no backup encryption), and whether the files on disk are encrypted by the operating system.

Client, replication and stored-data paths where recorded traffic could be exposed.

What PostgreSQL has not published about data lifetime protection

The PostgreSQL documentation checked on 2026-12-03 covers TLS, password storage and pgcrypto, but it does not describe post-quantum key exchange or signatures, a client-side groups setting, backup encryption or transparent data encryption. Data owners whose confidentiality period runs past the migration window should put each gap to the right party in writing and record the answer.

No post-quantum key exchange or signature feature

The server and libpq documentation for PostgreSQL 19 and the 18 and 19 release notes do not mention ML-KEM, ML-DSA or SLH-DSA, and the documented default for ssl_groups is X25519:prime256v1, which contains no post-quantum group. Any hybrid group use depends on the linked OpenSSL build accepting a group name in ssl_groups, as one 2026-02-19 hackers message shows with OpenSSL 3.5. Ask the PostgreSQL project, or your distribution packager, which post-quantum groups a supported release is tested to negotiate.

Connection settings, 19

No client-side groups parameter in libpq

The libpq connection parameters page lists no setting for choosing key exchange groups on the client side, so the server-side ssl_groups setting is the only documented control. Clients that connect through a driver or pooler may therefore negotiate groups that the database server never saw in its own configuration. Ask the driver maintainer and the PostgreSQL project whether a client-side groups option is planned, and confirm which groups each client library offers in its TLS handshake.

libpq connection parameters

No backup encryption option in pg_basebackup

The pg_basebackup page describes a base backup made over a regular PostgreSQL connection, and it lists no backup-encryption option and no SSL or TLS setting of its own. Its manifest checksums use CRC32C by default and the page says CRC32C does not resist malicious changes. Confirm with your backup tooling vendor or your storage administrator how backup files are encrypted at rest, and where the keys for that encryption are held.

pg_basebackup docs

No transparent data encryption

The PostgreSQL encryption options page lists storage encryption at the file system or block level by the operating system and does not mention transparent data encryption. Stored data therefore depends on the protection your platform provides below the database. Ask your managed service vendor, or your storage and operating system teams, which key management and algorithms protect data files, and whether those can be changed without a rebuild.

Encryption options

Unanswered backport question from 2026-02-19

A pgsql-hackers message dated 2026-02-19 reports that PostgreSQL 18 with ssl_groups set to X25519MLKEM768:X25519:prime256v1 negotiated a hybrid group over TLS 1.3, and that earlier versions rejected the ML-KEM group name because ssl_ecdh_curve did not accept it. The author asked whether the change could be backported to versions before 18. The thread text read contains no committer answer, so treat versions before 18 as unconfirmed until the project or your packager responds in writing.

Hackers thread, 2026-02-19

What can go wrong with a data lifetime plan for PostgreSQL

A data lifetime plan for PostgreSQL can fail quietly at the connection layer, so check the connection settings before trusting the plan. The most direct failure is a server that keeps the default ssl_groups value of X25519:prime256v1. That list contains no post-quantum group, so the server will not negotiate a hybrid group such as X25519MLKEM768 even when the OpenSSL build supports it. The current documentation for PostgreSQL 19 gives this default, and the 2026-02-19 pgsql-hackers thread shows that a hybrid group was negotiated only after ssl_groups was set to name it explicitly on PostgreSQL 18 with OpenSSL 3.5. Confirm the effective value on each server with SHOW ssl_groups; and confirm the OpenSSL version the server links against.

The client side can undo a server-side change. The libpq sslmode parameter defaults to prefer, which the documentation describes as making no sense from a security point of view and keeping only for backward compatibility. Under prefer, a client may accept an unverified server, so a connection that appears encrypted may not authenticate the server at all. Applications should set verify-full explicitly. The libpq library is also built against OpenSSL on each client, and a client build that differs from the server's OpenSSL build can offer different groups or reject the ones the server selects. Ask each team which libpq and OpenSSL versions their clients, drivers and poolers use, and record the answers as part of the inventory.

Two further assumptions cause problems. PostgreSQL 14 is no longer supported according to the PG Versioning page as of 2026-12-03, so a deployment on that version will not receive fixes, and it should be planned for upgrade rather than post-quantum tuning. Separately, the PostgreSQL encryption options page lists storage encryption at the operating system file or block level and does not mention transparent data encryption, so a plan that assumes the database encrypts data at rest may leave stored data without the protection the team expects. Confirm with the storage team which layer provides encryption at rest, and document the answer alongside the connection settings.

Questions data owners and vendor-risk reviewers ask about PostgreSQL data lifetime

Is PostgreSQL quantum safe?

No product claim can be made from the documentation checked on 2026-12-03. PostgreSQL does not provide its own TLS code and relies on OpenSSL, so any post-quantum protection of client connections depends on the OpenSSL build and on the ssl_groups setting. The PostgreSQL 18 and 19 release notes and the current server and libpq documentation do not mention post-quantum cryptography, ML-KEM, ML-DSA or SLH-DSA. The documented default for ssl_groups is X25519:prime256v1, which contains no post-quantum group. A February 2026 mailing list message shows a PostgreSQL 18 test negotiating the hybrid group X25519MLKEM768 with OpenSSL 3.5 when ssl_groups was set to include it. That is a configuration test, not a documented feature. Treat PostgreSQL as not supported for post-quantum protection until the project or your own testing confirms otherwise for your build.

Which PostgreSQL version do we need for post-quantum key exchange?

The mailing list test used PostgreSQL 18, with OpenSSL 3.5. Earlier versions could not accept the ML-KEM group name because the older setting, ssl_ecdh_curve, rejected it. PostgreSQL 18 renamed that setting to ssl_groups, which accepts multiple colon-separated groups. Confirm with the project whether the change could be backported to older supported versions, since the thread contains no committer answer. As of 2026-12-03, PostgreSQL 19 and 18 are listed as supported, and 14 is no longer supported. Verify the OpenSSL version in each server and client build, because the group must be available in that library. The version you need is set by your own build and testing, not by a PostgreSQL statement about post-quantum support.

Does moving PostgreSQL to post-quantum key exchange cost extra?

The main cost drivers are staff time, testing and the software your organization runs, not a PostgreSQL license fee. Costs are largely one-time: inventory of connections, testing in a staging environment, changes to ssl_groups and to client libraries, and documentation for auditors. Recurring costs include keeping OpenSSL and the server on supported versions and retesting after upgrades. Costs rise with the number of clients, drivers, poolers and proxies in the connection path, and with any need to upgrade major versions. If you use a managed PostgreSQL service, ask the provider what changes are under its control. Ask any vendor or consultant for a written quote that separates testing, configuration changes, upgrades and ongoing support.

What breaks when PostgreSQL changes its key exchange groups?

Clients that cannot negotiate the new group can fail to connect, or fall back to a weaker group if one is still configured. Check every application, driver, pooler and proxy in the connection path, since each uses its own TLS library. The libpq documentation lists no client-side setting for key exchange groups, so client behavior depends on the library and the OpenSSL build underneath it. Replication links and pg_basebackup use the same libpq connection security settings as other clients, so test them too. The documented sslmode default is prefer, which the documentation calls insecure and kept only for compatibility. Setting verify-full on clients is a separate hardening step that should be tested alongside any group change. Keep a rollback path, and test with the exact versions you run in production.

What should we ask the PostgreSQL vendor about post-quantum support?

Ask for a written statement that covers each supported major version and each edition or distribution you run, since the project itself is community-led and third-party distributions may build differently. Ask whether the project plans to add a post-quantum group or signature feature, and on what timeline. Ask whether the ML-KEM group name will be accepted in older supported versions, and whether the change will be backported. Ask which OpenSSL versions the vendor tests with and how they handle FIPS mode, since the documentation says X25519 is not allowed in FIPS mode. Ask how replication, pg_basebackup and backup tools are covered, and what they say about the backup manifest checksum options, which the documentation says do not resist malicious changes. Request dated answers and keep them with your inventory.

Can our team do PostgreSQL post-quantum work ourselves, or do we need outside help?

Your team can do the inventory and the first test in staging if it already runs PostgreSQL, OpenSSL and the client libraries, and has someone who reads TLS configuration. Outside help is most useful for a wide inventory across many clients and drivers, for building and packaging OpenSSL with the required group support, for audit evidence and for retesting after each upgrade. DeployOpen implements, hardens, upgrades, documents and supports self-hosted platforms inside your own infrastructure, and runs security testing. DeployOpen prepares systems and evidence for compliance assessments but does not issue audit reports or certifications. Engagements are fixed-scope and agreed in writing before work starts, and no price list is published, so ask for a quote based on the scope you define.

How DeployOpen helps plan PostgreSQL data lifetime protection

DeployOpen works with data owners to decide how long PostgreSQL data must stay confidential and which connections and replication links carry it. The work is fixed-scope and produces a written inventory, a priority order and a handover that your security and compliance teams can review.

How we scope

  • We agree in writing which PostgreSQL clusters, databases and replication links fall inside the engagement.
  • We record how long each data set must remain confidential, as stated by the data owner, before any technical change.
  • We confirm which PostgreSQL versions are in use, since PostgreSQL 14 is no longer supported and 18 and 19 are listed as supported.

How we build

  • We map which client connections use TLS, which use GSSAPI encryption and which rely on pg_basebackup over libpq.
  • We check the ssl_groups, ssl_min_protocol_version and sslmode settings in each environment against the documented defaults.
  • We test whether the OpenSSL build behind each server supports the key exchange groups you plan to use, and record the results.

How we hand over

  • You receive a written inventory of data sets, retention periods, connection paths and the settings found on each.
  • The priority order for migration is documented with the reasoning tied to each data set's required confidentiality period.
  • Gaps the documentation does not answer are listed as items to confirm with PostgreSQL or your OpenSSL distribution.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer after the handover is complete.
  • We retest connection settings after each PostgreSQL minor release or OpenSSL update that touches the scoped systems.
  • Support covers changes to the inventory when new replication links, backup paths or data sets are added to the cluster.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.