Skip to content

ssl_cert_file

ssl_cert_file is the PostgreSQL setting that identifies the location of the SSL server certificate file.
Note

Fact — official short description: “Location of the SSL server certificate file.”

Identity

Type , Valuestring
Upstream pg_settings type
Context , Valuesighup
Takes effect after configuration reload
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueConnections and Authentication / SSL
Upstream classification
Latest boot value , Valueserver.crt
server.crt

Lifecycle

Fact Value
First observed PG9.2
Present in PG9.2–19 Beta 3
Removed in No
Introduction commit a445cb92ef5b — Add parameters for controlling locations of server-side SSL files
Commit date 2012-02-22
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.2–19 Beta 3 server.crt server.crt

How it works

ssl_cert_file identifies the location of the SSL server certificate file. The PEM file supplies the server leaf certificate and may include intermediate certificates needed to present a complete chain to clients.

ssl_cert_file 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.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Deploy a certificate whose key usage, SANs, validity, and chain match every advertised database endpoint. Test reload and a fresh client handshake before removing the previous certificate.
OLAP Analytical endpoints need the same identity guarantees; if they use a separate name, issue the correct SAN rather than reusing a mismatched certificate.
Small nodes Automate renewal and expiry alerts. A small node gains nothing from a shorter chain if clients cannot build trust; keep only the necessary leaf and intermediates.

Pigsty

Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.

Template Effective value Versus upstream boot Source expression
OLTP /pg/cert/server.crt different '/pg/cert/server.crt'
OLAP /pg/cert/server.crt different '/pg/cert/server.crt'
CRIT /pg/cert/server.crt different '/pg/cert/server.crt'
TINY /pg/cert/server.crt different '/pg/cert/server.crt'
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.2–19 Beta 3 = /pg/cert/server.crt (dcs); OLAP: PG9.2–19 Beta 3 = /pg/cert/server.crt (dcs); CRIT: PG9.2–19 Beta 3 = /pg/cert/server.crt (dcs); TINY: PG9.2–19 Beta 3 = /pg/cert/server.crt (dcs). Advice, pending human review — Editorial inference: The common managed server-certificate path aligns every profile with the same certificate lifecycle layout.

Common pitfalls

  • Editing ssl_cert_file 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_cert_file globally without a rollback plan and a client or operational compatibility test.

ssl · ssl_key_file · ssl_ca_file · ssl_crl_file · ssl_min_protocol_version

References