select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

CONFIGURATION / CONNECTIONS AND AUTHENTICATION

ssl_max_protocol_version

Read PG 18 manual ↗

Sets the maximum SSL/TLS protocol version to use.

Type
enum
Context
sighup
Measured default
Empty string
Unit
Metadata snapshot
18
Allowed values
, TLSv1, TLSv1.1, TLSv1.2, TLSv1.3

Definition PG 18 manual

Sets the maximum SSL/TLS protocol version to use. Valid values are as for ssl_min_protocol_version, with addition of an empty string, which allows any protocol version. The default is to allow any version. Setting the maximum protocol version is mainly useful for testing or if some component has issues working with a newer protocol.

This parameter can only be set in the postgresql.conf file or on the server command line.

Measured default history
Version intervalDefault
12 – 19Empty string
Analysis & operational context

Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗

How it works

ssl_max_protocol_version sets the maximum SSL/TLS protocol version to use. An empty value imposes no PostgreSQL-specific ceiling beyond the SSL library, while a named version can intentionally block newer protocols for compatibility testing.

ssl_max_protocol_version is a SIGHUP-context setting: a configuration reload activates the new server value without a restart; subsequent operations that consult it use the refreshed value. Existing TLS sessions are not renegotiated.

It participates in the TLS context used for new handshakes. ssl enables transport, pg_hba.conf decides which connection classes require it, and the certificate, key, CA, revocation, protocol, and cipher settings must form one valid policy.

Operational considerations

Editing ssl_max_protocol_version 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_max_protocol_version 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_max_protocol_version 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_max_protocol_version simple and secure, using managed certificates and library defaults reviewed for the installed OpenSSL version. Rehearse renewal before expiry.

Version history 1
  1. PG 11 → 12added

Related entries

Further reading

Definition snapshot: english-manuals:156e1ad5ef40d14db1612b7dce1… · English manual source