post_auth_delay
Fact — official short description: “Sets the amount of time to wait after authentication on connection startup.”
Identity
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | 0 |
s |
0 s |
How it works
post_auth_delay pauses a newly created backend after authentication succeeds, giving a developer time to attach a debugger to that process. Zero disables the delay.
The backend-context value is fixed at session start. Authentication has completed, so the session and server resources are already allocated while it sleeps.
This intentionally increases connection latency and can consume backend slots under connection storms. It is not a throttling, security, or connection-pooling control. Its backend context fixes the value during connection startup; an existing session cannot change it.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Do not tune production OLTP with post_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. |
| OLAP | Long analytical runs can amplify post_auth_delay’s debug overhead and artifacts. Prefer standard EXPLAIN and statistics first, and isolate any developer experiment from normal users. |
| Small nodes | Keep post_auth_delay at its upstream default. A small host has less spare CPU, disk, connection, and log capacity for developer instrumentation. |
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 | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Leaving post_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.
Related parameters
pre_auth_delay · authentication_timeout · max_connections · log_connections