{"Entry":{"collection":"guc","key":"trace_connection_negotiation","name":"trace_connection_negotiation","aliases":[],"metadata":{"baseline":false,"boot_human":"off","boot_val":"off","category":"Developer Options","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"16","status":"added","to":"17"},{"documentation_changed":false,"fields":{},"from":"19","status":"removed","to":"20"}],"content_hash":"b7716c51903f8dcfc81e229682103a8b6f764e86827d502a3d61230ced44b9d6","context":"postmaster","default_changed_in":[],"default_history":[{"from":"17","to":"19","value":"off"}],"editorial":{"advice":{"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."},"mechanism":["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."],"pitfalls":["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."],"references":[{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["log_connections","authentication_timeout","ssl","pre_auth_delay","log_error_verbosity"],"summary":"trace_connection_negotiation — Logs details of pre-authentication connection handshake. Observed in PG17–19 Beta 4; its last measured boot default is off in PG19 Beta 4, with postmaster context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"17","group":"Developer Options","group_slug":"developer","imported_at":"2026-09-27T17:57:32.172324+08:00","intro_commit":{"authored_at":"2024-04-08T02:49:37+03:00","discussion":["https://www.postgresql.org/message-id/CAEze2Wja8VUoZygCepwUeiCrWa4jP316k0mvJrOW4PFmWP0Tcw@mail.gmail.com"],"hash":"705843d294d5d3bc5cce4001596df4df5f1c8b59","subject":"Enhance libpq encryption negotiation tests with new GUC","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=705843d294d5d3bc5cce4001596df4df5f1c8b59"},"key":"trace_connection_negotiation","last_version":"19","max_val":"","min_val":"","name":"trace_connection_negotiation","position":416,"present_in":["17","18","19"],"short_desc":"Logs details of pre-authentication connection handshake.","short_desc_zh":"","source_rev":"english-manuals:d350c5df6e61026ea47503e7b73ca1a878b6706a0a4b1ea96736f4778162f29a","unit":"","vartype":"bool"}},"Definition":{"Collection":"guc","Key":"trace_connection_negotiation","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"trace_connection_negotiation","SourceRevision":"english-manuals:d350c5df6e61026ea47503e7b73ca1a878b6706a0a4b1ea96736f4778162f29a","Facts":{"boot_val":"off","category":"Developer Options","context":"postmaster","description":"","doc":{},"documented":false,"enumvals":null,"extra_desc":null,"lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"trace_connection_negotiation","short_desc":"Logs details of pre-authentication connection handshake.","source":"pg-settings-source-snapshot","unit":null,"vartype":"bool"},"ManualEvidence":{"doc":{}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"trace_connection_negotiation","SourceDatabase":"","Version":"","Locale":"","Title":"","Summary":"","BodyHTML":"","SourceRevision":"","ContentHash":"","Payload":null},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["17","18","19","20"],"Locales":[],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
