# post_auth_delay

> post_auth_delay — Sets the amount of time to wait after authentication on connection startup. Observed in PG9.0–19 Beta 3; its last measured boot default is 0 s in PG19 Beta 3, with backend context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
---

> [!NOTE]
> **Fact — official short description:** “Sets the amount of time to wait after authentication on connection startup.”

## Identity {#identity}

| Field | Value | Meaning |
| --- | --- | --- |
| Type | `integer` | Upstream pg_settings type |
| Context | `backend` | Fixed when a backend starts |
| Unit | `s` | Raw unit |
| Range | `0` – `2147` | Raw limits in the last observed version |
| Enum values | — | — for non-enum types |
| Category | Developer Options | Upstream classification |
| Latest boot value | `0` | 0 s |
{.fields meta="-"}

## Lifecycle {#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 {#default-history}

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

## How it works {#mechanism}

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

> [!TIP]
> **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. |
{.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: 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 {#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 {#related-parameters}

[`pre_auth_delay`](/parameters/pre-auth-delay/) · [`authentication_timeout`](/parameters/authentication-timeout/) · [`max_connections`](/parameters/max-connections/) · [`log_connections`](/parameters/log-connections/)

## References {#references}

- [PostgreSQL 19 Beta 3 — post_auth_delay](https://www.postgresql.org/docs/19/runtime-config-developer.html#GUC-POST-AUTH-DELAY)
- [PostgreSQL 19 release notes](https://www.postgresql.org/docs/19/release-19.html)
- [Machine-readable GUC export](/data/guc.jsonl)
