pg_login_guard
Fail2ban-style role lockout after repeated authentication failures.
pg_login_guard · Fail2ban-style role lockout after repeated authentication failures.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101914 | pg_login_guard | pg_login_guard | 1.0 | SEC | MIT | C |
PostgreSQL · 16, 17, 18
Usage
Sources:
pg_login_guard Fail2ban-style role lockout after repeated authentication failures.
Enablement
Merge pg_login_guard into the existing preload list, restart PostgreSQL, and then create pg_login_guard in each database that needs its SQL objects:
Core Workflow
The following example is taken from the reviewed upstream documentation. Adapt object names, paths, credentials, and workload values before use.
Main Objects
The reviewed install surface includes these prominent objects:
| Object | Kind | Operational role |
|---|---|---|
pg_login_guard_status | FUNCTION | Callable function from the reviewed install surface. |
pg_login_guard_reset | FUNCTION | Callable function from the reviewed install surface. |
pg_login_guard_unlock | FUNCTION | Callable function from the reviewed install surface. |
Operations and Boundaries
- The verified PostgreSQL-major evidence covers 16, 17, 18; do not infer unlisted majors.
- Preloading
pg_login_guardchanges cluster startup state; stage configuration and restart changes separately fromCREATE EXTENSION.