pg_bloat_cause
pg_bloat_cause · Explains why dead rows are not being cleaned up and records diagnostic history
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 102287 | pg_bloat_cause | pg_bloat_cause | 0.7.0 | ADMIN | PostgreSQL | SQL |
PostgreSQL · 14, 15, 16, 17, 18
Usage
Sources:
pg_bloat_cause 0.7.0 diagnoses why dead rows are not being removed, using PostgreSQL catalog and statistics evidence. It is pure SQL, tested on PostgreSQL 14–19rc1, with superuser installation and no preload or restart.
Read a Diagnosis
Findings distinguish pinned cleanup horizons, ineffective autovacuum and non-HOT update pressure. They are estimates and observations, not an exact physical bloat measurement. A logical slot’s catalog_xmin holds catalog cleanup rather than automatically pinning ordinary user-table rows. Action helpers present commands for operator review and do not execute repairs.
Permissions, History and Alerts
Readers need explicit view/function grants and pg_read_all_stats to inspect other sessions. Sampling, pruning and NOTIFY functions also need write permissions on their history and alert tables. An external scheduler must call them; no worker is installed. Capturing holder query text is opt-in and may retain secrets. Restore the relevant roles and grants with the extension’s application history.