select open change scope Open full search

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

CONFIGURATION / DEVELOPER OPTIONS

pre_auth_delay

Read PG 18 manual ↗

The amount of time to delay just after a new server process is forked, before it conducts the authentication procedure.

Type
integer
Context
sighup
Measured default
0 s
Unit
s
Metadata snapshot
18

Definition PG 18 manual

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.

Measured default history
Version intervalDefault
9.0 – 190 s
Analysis & operational context

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

How it works

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.

Operational considerations

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.

Workload guidance

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.

Version history 2
  1. PG 14 → 15changed
  2. PG 11 → 12changed

Related entries

Further reading

Definition snapshot: english-manuals:d90e8b9c95e5e7769e775ddf76c… · English manual source