{"Entry":{"collection":"guc","key":"pre_auth_delay","name":"pre_auth_delay","aliases":[],"metadata":{"baseline":true,"boot_human":"Not specified","boot_val":null,"category":"Developer Options","category_zh":"","changed_in":["15"],"changes":[{"documentation_changed":true,"fields":{},"from":"8.1","status":"changed","to":"8.2"},{"documentation_changed":true,"fields":{},"from":"8.4","status":"changed","to":"9.0"},{"documentation_changed":true,"fields":{},"from":"11","status":"changed","to":"12"},{"documentation_changed":false,"fields":{"short_desc":{"from":"Waits N seconds on connection startup before authentication.","to":"Sets the amount of time to wait before authentication on connection startup."}},"from":"14","status":"changed","to":"15"}],"content_hash":"f36651bb02dd9754dfc3557cba4229846082e04e2e580e690d612c51b464cb32","context":"","default_changed_in":[],"default_history":[{"from":"9.0","to":"19","value":"0 s"}],"derived_content_hash":"4505690db8285f05dc1bf0e87933bec06f2f72d9d696e035d21028adf7d3ef80","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:944835fd0aa06243ab342cef863d4c66f8f9ea4f7c34112789ac6ae95f49e1d1","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"editorial":{"advice":{"olap":"Long analytical runs can amplify pre_auth_delay'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 pre_auth_delay. 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 pre_auth_delay at its upstream default. A small host has less spare CPU, disk, connection, and log capacity for developer instrumentation."},"mechanism":["pre_auth_delay pauses a newly forked server process before authentication so a developer can attach a debugger to handshake and authentication code. Zero disables it.","The SIGHUP setting applies to future connection startups. While a process sleeps, the client is unauthenticated and a server process and connection slot can remain occupied.","It intentionally delays every affected connection and can amplify denial-of-service exposure. It is not a replacement for authentication_timeout or network rate limiting. Its SIGHUP context allows configuration reload without a server restart."],"pitfalls":["Leaving pre_auth_delay 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 Beta 4: pre_auth_delay","url":"https://www.postgresql.org/docs/19/runtime-config-developer.html#GUC-PRE-AUTH-DELAY"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["post_auth_delay","authentication_timeout","max_connections","trace_connection_negotiation"],"summary":"pre_auth_delay — Sets the amount of time to wait before authentication on connection startup. Observed in PG9.0–19 Beta 4; its last measured boot default is 0 s in PG19 Beta 4, with sighup context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"7.4","group":"Developer Options","group_slug":"developer","imported_at":"2026-09-27T17:57:31.837205+08:00","intro_commit":{},"key":"pre_auth_delay","last_version":"20","max_val":"","min_val":"","name":"pre_auth_delay","position":314,"present_in":["7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"wiki-repair-20261023:8c76f3d096fd1f8e2e4ecc7d7ec71353975bfc1bbf3c4989d038646f5959d3ac","receipt_sha256":"74dadcff9d8491a646dbe8baf9d6d7ef7be6374828e56042a6dad93d5933118f","repair":"wiki-repair-20261023"},"short_desc":"The amount of time to delay just after a new server process is forked, before it conducts the authentication procedure.","short_desc_zh":"","source_rev":"wiki-repair-20261023:944835fd0aa06243ab342cef863d4c66f8f9ea4f7c34112789ac6ae95f49e1d1","unit":"","vartype":"integer"}},"Definition":{"Collection":"guc","Key":"pre_auth_delay","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"pre_auth_delay","SourceRevision":"wiki-repair-20261023:944835fd0aa06243ab342cef863d4c66f8f9ea4f7c34112789ac6ae95f49e1d1","Facts":{"boot_val":"0","category":"Developer Options","context":"sighup","description":"The amount of time to delay just after a new server process is forked, before it conducts the authentication procedure. This is intended to give developers an opportunity to attach to the server process with a debugger to trace down misbehavior in authentication. If this value is specified without units, it is taken as seconds. A value of zero (the default) disables the delay. This parameter can only be set in the postgresql.conf file or on the server command line.","description_zh":"新服务器进程刚刚派生之后、执行认证过程之前的延迟时间。这旨在给开发者一个机会，用调试器附加到服务器进程上，跟踪认证过程中的异常行为。如果指定值时没有单位，则以秒为单位。零值（默认值）禁用延迟。这个参数只能在 postgresql.conf 文件中或在服务器命令行上设置。","description_zh_html":"\u003cp\u003e\n        新服务器进程刚刚派生之后、执行认证过程之前的延迟时间。这旨在给开发者一个机会，用调试器附加到服务器进程上，跟踪认证过程中的异常行为。如果指定值时没有单位，则以秒为单位。零值（默认值）禁用延迟。这个参数只能在 \u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e 文件中或在服务器命令行上设置。\n       \u003c/p\u003e","doc":{"anchor":"GUC-PRE-AUTH-DELAY","file":"runtime-config-developer.html","lang":"en","sha256":"a3f6a107ed6ba4edaf6df03e52f4a469bd09350d545e4ff419e62844025ec1cf","slug":"18"},"doc_html":"\u003cp\u003e\n        The amount of time to delay just after a\n        new server process is forked, before it conducts the\n        authentication procedure.  This is intended to give developers an\n        opportunity to attach to the server process with a debugger to\n        trace down misbehavior in authentication.\n        If this value is specified without units, it is taken as seconds.\n        A value of zero (the default) disables the delay.\n        This parameter can only be set in the \u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e\n        file or on the server command line.\n       \u003c/p\u003e","doc_same_as":"","documentation_revision":{"inputs":[{"file":"runtime-config-developer.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"a3f6a107ed6ba4edaf6df03e52f4a469bd09350d545e4ff419e62844025ec1cf","version":"18.7"},{"file":"runtime-config-developer.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"e7e22aa5738a1d376b84af1adca796c5e14746266733f925eb50c3ef86a50655","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"documented":true,"enumvals":null,"extra_desc":"This allows attaching a debugger to the process.","lang":"en","max_val":"60","metadata_version":"18","min_val":"0","name":"pre_auth_delay","short_desc":"Sets the amount of time to wait before authentication on connection startup.","source":"pg-settings-source-snapshot","translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/runtime-config-developer.html","sha256":"3c08bf624188bbb0733dc7854e61c0c251c2578311ac3dc8fa626ab21b7911d1"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"unit":"s","vartype":"integer","zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"GUC-PRE-AUTH-DELAY","file":"runtime-config-developer.html","lang":"en","sha256":"a3f6a107ed6ba4edaf6df03e52f4a469bd09350d545e4ff419e62844025ec1cf","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"pre_auth_delay","SourceDatabase":"center","Version":"18","Locale":"en","Title":"pre_auth_delay","Summary":"The amount of time to delay just after a new server process is forked, before it conducts the authentication procedure. This is intended to give developers an opportunity to attach to the server process with a debugger to trace down misbehavior in authentication. If this value is specified without units, it is taken as seconds. A value of zero (the default) disables the delay. This parameter can only be set in the postgresql.conf file or on the server command line.","BodyHTML":"\u003cp\u003e\n        The amount of time to delay just after a\n        new server process is forked, before it conducts the\n        authentication procedure.  This is intended to give developers an\n        opportunity to attach to the server process with a debugger to\n        trace down misbehavior in authentication.\n        If this value is specified without units, it is taken as seconds.\n        A value of zero (the default) disables the delay.\n        This parameter can only be set in the \u003ccode\u003epostgresql.conf\u003c/code\u003e\n        file or on the server command line.\n       \u003c/p\u003e","SourceRevision":"wiki-repair-20261023:944835fd0aa06243ab342cef863d4c66f8f9ea4f7c34112789ac6ae95f49e1d1","ContentHash":"206fe026d55004ea5bff306f98812f244f0bf612012ace8a235dba606babf89f","Payload":{"description":"The amount of time to delay just after a new server process is forked, before it conducts the authentication procedure. This is intended to give developers an opportunity to attach to the server process with a debugger to trace down misbehavior in authentication. If this value is specified without units, it is taken as seconds. A value of zero (the default) disables the delay. This parameter can only be set in the postgresql.conf file or on the server command line."}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
