DB Internals AtlasPostgreSQL 18.6 Home About

Parameter · Developer Options

pre_auth_delay

Sets the amount of time to wait before authentication on connection startup. This allows attaching a debugger to the process.

  • Default: 0
  • Type: integer (s)
  • Range: 0 … 1min
  • Applies: Reload

In plain words

When a client connects, the postmaster starts a new backend process. This setting makes that process sleep for the given number of seconds before it checks the password, giving a developer time to attach a debugger to it and trace authentication.

For DBAs and operators

The sleep happens right after the backend is forked, before the startup packet is read and pg_hba.conf is evaluated. Find the process with ps (it is the newest child of the postmaster; during the delay its title is still the postmaster's command line) and run gdb -p <pid>. Range 0–60 s; reload is enough.

Every connection waits, so it should never be left on in production and clients or poolers with short connect timeouts may give up. For tracing problems after login, use post_auth_delay.

Developer option: meant for debugging and testing PostgreSQL itself. Leave it at the default on production servers unless a specific diagnosis calls for it.

How to change it

Change in postgresql.conf or ALTER SYSTEM, then run SELECT pg_reload_conf().

See it in context

Postmaster Client authentication Client backend

Related parameters

post_auth_delay authentication_timeout log_connections

All Developer Options parameters