pg_promise_guard
pg_promise_guard · Detect unenforced constraints, invalid indexes and disabled triggers in the PostgreSQL catalogs
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 5310 | pg_promise_guard | pg_promise_guard | 0.2.11 | ADMIN | Apache-2.0 | SQL |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| ----d-- | No | No | No | Yes | no | no |
| Relationships | |
|---|---|
| Schemas | promise_guard |
| See Also | amcheck pgtap pg_permissions pg_qualstats pg_checksums pg_living_assertions |
Packages
| Linux / PG | PG19 | PG18 | PG17 | PG16 | PG15 |
|---|---|---|---|---|---|
| el8.x86_64 | N/A | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 |
| el8.aarch64 | N/A | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 |
| el9.x86_64 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 |
| el9.aarch64 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 |
| el10.x86_64 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 |
| el10.aarch64 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 |
| d12.x86_64 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 |
| d12.aarch64 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 |
| d13.x86_64 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 |
| d13.aarch64 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 |
| u22.x86_64 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 |
| u22.aarch64 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 |
| u24.x86_64 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 |
| u24.aarch64 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 |
| u26.x86_64 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 |
| u26.aarch64 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 | PIGSTY 0.2.11 |
Source
github.com/Manuelreyesbravo/pg_promise_guard
pg_promise_guard-0.2.11.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
Sources:
pg_promise_guard 0.2.11 scans system catalogs for declared guarantees that are no longer fully enforced. It optionally uses pg_living_assertions 0.5.6 or later for watch(), uses pure SQL and needs no preload.
Core Workflow
0.2.10 Dependency Boundary
Version 0.2.10 makes pg_living_assertions optional at installation time. Ordinary catalog checks work without it; promise_guard.watch() reports a clear dependency error until it is installed. Monitoring roles may still use the checks under the documented grants. Existing installations retain the dependency recorded when they were created.
Operational Boundaries
promise_guard.check_promises() returns breaches and gaps; promise_guard.promises_kept() is false only for breaches, and promise_guard.watch() records the verdict in living assertions. Only READ COMMITTED is accepted, and nonexistent schemas raise errors. Disabled triggers, unenforced constraints and inactive policies/rules can be breaches. Replica-only triggers, unvalidated history and a ready-but-invalid unique index can be gaps; failed indexes that accept duplicates remain breaches. Only objects of superuser-owned extensions are excluded. Old watches from before 0.2.7 should be retired and recreated to adopt catalog-first name resolution. The scan does not prove physical integrity or audit all privileges. The 0.2.11 source documents tests on PostgreSQL 11–19. Current Apache-2.0 licensing starts at 0.2.3.
Current Compatibility
Version 0.2.11 updates documentation and tested compatibility without changing SQL objects. Upstream records PostgreSQL 11–19 coverage. The supplied 0.2.10-to-0.2.11 SQL update advances the extension version only; keep the earlier role and dependency requirements above.