select open change scope Open full search

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

CONFIGURATION / DEVELOPER OPTIONS

trace_connection_negotiation

Type
bool
Context
postmaster
Measured default
off
Unit
Metadata snapshot
18

Definition PG 18 manual

No dedicated definition was found in this manual. The parameter’s presence and values come from the metadata snapshot identified above.

Measured default history
Version intervalDefault
17 – 19off
Analysis & operational context

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

How it works

trace_connection_negotiation logs details from the pre-authentication connection negotiation path, providing evidence for protocol, encryption, and handshake debugging before normal authentication logs are available.

It is a server-start setting, so enabling it affects subsequent connection handshakes cluster-wide until restart. It does not alter authentication rules or make negotiation succeed.

Handshake logs can be high-volume and reveal network or client capability details. Use a controlled reproduction and protect the resulting server logs. Its postmaster context fixes the value at server start; changing it requires a restart.

Operational considerations

Leaving trace_connection_negotiation enabled after the bounded diagnostic or recovery task.

Running the experiment on the only copy of production data.

Underestimating log, core-file, temporary-file, WAL, CPU, or connection-slot amplification.

Treating a server that merely starts or completes a query as proof that data and behavior are correct.

Workload guidance

OLAP: Long analytical runs can amplify trace_connection_negotiation's debug overhead and artifacts. Prefer standard EXPLAIN and statistics first, and isolate any developer experiment from normal users.

OLTP: Do not tune production OLTP with trace_connection_negotiation. Enable it only for a bounded reproduction with an owner, log/disk budget, rollback condition, and evidence-capture plan; restore the default immediately afterward.

SMALL: Keep trace_connection_negotiation at its upstream default. A small host has less spare CPU, disk, connection, and log capacity for developer instrumentation.

Version history 2
  1. PG 19 → 20removed
  2. PG 16 → 17added

Related entries

Further reading

Definition snapshot: english-manuals:caf33be4609cd7ac0d834ff801b…