ssl_ciphers
Read PG 18 manual ↗Specifies a list of SSL ciphers that are allowed by connections using TLS version 1.2 and lower, see ssl_tls13_ciphers for TLS version 1.3 connections.
- Type
- string
- Context
- sighup
- Measured default
- HIGH:MEDIUM:+3DES:!aNULL
- Unit
- —
- Metadata snapshot
- 18
Definition PG 18 manual
Specifies a list of SSL ciphers that are allowed by connections using TLS version 1.2 and lower, see ssl_tls13_ciphers for TLS version 1.3 connections. See the ciphers manual page in the OpenSSL package for the syntax of this setting and a list of supported values. The default value is HIGH:MEDIUM:+3DES:!aNULL. The default is usually a reasonable choice unless you have specific security requirements.
This parameter can only be set in the postgresql.conf file or on the server command line.
Explanation of the default value:
HIGHCipher suites that use ciphers from
HIGHgroup (e.g., AES, Camellia, 3DES)MEDIUMCipher suites that use ciphers from
MEDIUMgroup (e.g., RC4, SEED)+3DESThe OpenSSL default order for
HIGHis problematic because it orders 3DES higher than AES128. This is wrong because 3DES offers less security than AES128, and it is also much slower.+3DESreorders it after all otherHIGHandMEDIUMciphers.!aNULLDisables anonymous cipher suites that do no authentication. Such cipher suites are vulnerable to MITM attacks and therefore should not be used.
Available cipher suite details will vary across OpenSSL versions. Use the command openssl ciphers -v 'HIGH:MEDIUM:+3DES:!aNULL' to see actual details for the currently installed OpenSSL version. Note that this list is filtered at run time based on the server key type.
Measured default history
| Version interval | Default |
|---|---|
| 9.1 – 9.2 | ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH |
| 9.3 – 9.3 | DEFAULT:!LOW:!EXP:!MD5:@STRENGTH |
| 9.4 – 19 | HIGH:MEDIUM:+3DES:!aNULL |
Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗
How it works
The ssl_ciphers name already exists in PostgreSQL's GUC source at the project's 2008 history boundary and in PG9.0, where it is compiled only under USE_SSL. The audited PG9.0 fallback build does not enable OpenSSL, so the name first appears in the PG9.1 official-image snapshot; that matrix boundary reflects build capability, not the feature's original invention.
The OpenSSL cipher string governs TLS 1.2 and older handshakes. PostgreSQL 18 and later configure TLS 1.3 suites separately with ssl_tls13_ciphers. A SIGHUP reload changes the policy for new TLS contexts and connections but does not renegotiate sessions that are already established.
Treat ssl_ciphers as one part of a complete transport policy with ssl, pg_hba.conf, certificate and key files, CA and revocation settings, protocol floors and ceilings, ssl_groups, and client capabilities. Validate the exact installed OpenSSL build because accepted cipher names and security levels are library-dependent.
Operational considerations
Editing ssl_ciphers without reloading configuration and verifying the effective value and subsequent behavior.
Updating only one TLS file or policy knob and leaving an invalid chain, unreadable key, or incompatible protocol set.
Assuming a reload renegotiates existing sessions; TLS policy changes affect new handshakes.
Changing ssl_ciphers globally without a rollback plan and a client or operational compatibility test.
Workload guidance
OLAP: Use the same TLS floor for analytical traffic; benchmark only after correctness because bulk transfer may expose CPU cost but is not a reason to accept obsolete protocols.
OLTP: Treat ssl_ciphers as transport-security policy rather than a performance knob. Follow the organization's TLS baseline and test certificate rotation, reload, and every client class.
SMALL: Keep ssl_ciphers simple and secure, using managed certificates and library defaults reviewed for the installed OpenSSL version. Rehearse renewal before expiry.
Version history 9
- PG 17 → 18changed
- PG 15 → 16changed
- PG 13 → 14changed
- PG 10 → 11changed
- PG 9.6 → 10changed
- PG 9.4 → 9.5changed
- PG 9.3 → 9.4changed
- PG 9.2 → 9.3changed
- PG 9.0 → 9.1changed
Related entries
Further reading
Definition snapshot: english-manuals:18644c0600588dedc6aff3b01a5… · English manual source