auth_delay

pause briefly before reporting authentication failure

Overview

PackageVersionCategoryLicenseLanguage
auth_delay-SECPostgreSQLC
IDExtensionBinLibLoadCreateTrustRelocSchema
7970auth_delayNoYesYesNoNoNo-
Relatedpg_auth_mon credcheck login_hook passwordcheck passwordcheck_cracklib pgaudit set_user pg_permissions

Version

PG18PG17PG16PG15PG14
-----

Install

Note: This is a built-in contrib extension of PostgreSQL

Usage

auth_delay: Pause before reporting authentication failure

auth_delay pauses the server briefly before reporting authentication failures, making brute-force password attacks more difficult.

Configuration

Add to postgresql.conf:

shared_preload_libraries = 'auth_delay'
auth_delay.milliseconds = '500'

Configuration Parameters

ParameterDefaultDescription
auth_delay.milliseconds0Milliseconds to wait before reporting auth failure

Notes

  • Must be loaded via shared_preload_libraries
  • Does not prevent denial-of-service attacks (waiting processes still hold connection slots)
  • No CREATE EXTENSION is required – this is a shared library module only

Last Modified 2026-03-12: add pg extension catalog (95749bf)