# ssl_dh_params_file

> ssl_dh_params_file is the PostgreSQL setting that identifies the location of the SSL DH parameters file.
---

> [!NOTE]
> **Fact — official short description:** “Location of the SSL DH parameters file.”

## Identity {#identity}

| Field | Value | Meaning |
| --- | --- | --- |
| Type | `string` | Upstream pg_settings type |
| Context | `sighup` | Takes effect after configuration reload |
| Unit | — | Raw unit |
| Range | — | Raw limits in the last observed version |
| Enum values | — | — for non-enum types |
| Category | Connections and Authentication / SSL | Upstream classification |
| Latest boot value | `""` | empty string |
{.fields meta="-"}

## Lifecycle {#lifecycle}

| Fact | Value |
| --- | --- |
| First observed | PG10 |
| Present in | PG10–19 Beta 3 |
| Removed in | No |
| Introduction commit | [`c0a15e07cd71`](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=c0a15e07cd718cb6e455e68328f522ac076a0e4b) — Always use 2048 bit DH parameters for OpenSSL ephemeral DH ciphers. |
| Commit date | 2017-07-31 |
| Discussion | [thread 1](https://www.postgresql.org/message-id/CAMxBoUyjOOautVozN6ofzym828aNrDjuCcOTcCquxjwS-L2hGQ@mail.gmail.com) |

## Default history {#default-history}

| Versions | Raw `boot_val` | Unit | Human value |
| --- | --- | --- | --- |
| PG10–19 Beta 3 | `""` | — | empty string |
{.full-width caption="Measured PG9.0–19 Beta 3 boot defaults"}

## How it works {#mechanism}

ssl_dh_params_file identifies the location of the SSL DH parameters file. An empty string means use compiled-in default parameters. An empty value uses PostgreSQL's compiled-in DH parameters; the file matters only for cipher suites that perform finite-field Diffie-Hellman exchange.

ssl_dh_params_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 {#tuning-advice}

> [!TIP]
> **Advice.** These are workload-specific starting points and must be validated with measurements.

| Workload | Guidance |
| --- | --- |
| OLTP | Use a custom ssl_dh_params_file only when finite-field ephemeral-DH cipher suites are intentionally supported and the parameters are generated by an approved current process. Test OpenSSL acceptance and reload before rollout. |
| OLAP | Analytical throughput is not a reason to weaken DH parameters. Prefer the same reviewed key-exchange policy and measure only after client compatibility is proven. |
| Small nodes | Leave the file empty to use PostgreSQL's compiled-in parameters unless policy requires a managed custom set; generating or loading custom parameters does not improve capacity. |
{.full-width}

## Pigsty {#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 | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
{.full-width}

> [!CAUTION]
> **Advice — pending human review.** Fact from the current Pigsty template projection: OLTP: PG10–19 Beta 3 unmodified; OLAP: PG10–19 Beta 3 unmodified; CRIT: PG10–19 Beta 3 unmodified; TINY: PG10–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

## Common pitfalls {#common-pitfalls}

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

## Related parameters {#related-parameters}

[`ssl_ciphers`](/parameters/ssl-ciphers/) · [`ssl_tls13_ciphers`](/parameters/ssl-tls13-ciphers/) · [`ssl_min_protocol_version`](/parameters/ssl-min-protocol-version/) · [`ssl_max_protocol_version`](/parameters/ssl-max-protocol-version/) · [`ssl_prefer_server_ciphers`](/parameters/ssl-prefer-server-ciphers/) · [`ssl_groups`](/parameters/ssl-groups/)

## References {#references}

- [PostgreSQL 19 Beta 3 — ssl_dh_params_file](https://www.postgresql.org/docs/19/runtime-config-connection.html#GUC-SSL-DH-PARAMS-FILE)
- [PostgreSQL 19 release notes](https://www.postgresql.org/docs/19/release-19.html)
- [Machine-readable GUC export](/data/guc.jsonl)
