pg_catcheck
Diagnosing system catalog corruption
pg_catcheck : Diagnosing system catalog corruption
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 5160 | pg_catcheck | pg_catcheck | 1.6.0 |
ADMIN | BSD-3-Clause | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-- | No | Yes | No | Yes | no | no |
| Relationships | |
|---|---|
| See Also | amcheck pg_checksums pg_surgery pg_orphaned pg_pathcheck pageinspect pg_isok pgdd ddlx meta |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PGDG | 1.6.0 |
18 17 16 15 14 | pg_catcheck |
- |
| RPM | PGDG | 1.6.0 |
18 17 16 15 14 | pg_catcheck_$v |
- |
| DEB | PGDG | 1.6.0 |
18 17 16 15 14 | postgresql-$v-pg-catcheck |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 |
| el8.aarch64 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 |
| el9.x86_64 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 |
| el9.aarch64 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 |
| el10.x86_64 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 |
| el10.aarch64 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 |
| d12.x86_64 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 |
| d12.aarch64 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 |
| d13.x86_64 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 |
| d13.aarch64 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 |
| u22.x86_64 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 |
| u22.aarch64 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 |
| u24.x86_64 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 |
| u24.aarch64 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 |
| u26.x86_64 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 |
| u26.aarch64 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 | PGDG 1.6.0 |
Source
github.com/EnterpriseDB/pg_catcheck
Install
Make sure PGDG repo available:
Install this extension with pig:
Create this extension with:
Usage
pg_catcheck is a command-line tool that checks PostgreSQL system catalogs for corruption by verifying cross-references between catalog tables. It accepts the same connection parameters as other PostgreSQL utilities (-h, -p, -U, -d).
Basic Usage
Normal output when no issues are found:
Example Output with Corruption
Result Categories
- Inconsistencies: logical problems in catalog cross-references (e.g., dangling OID references)
- Warnings: more serious issues
- Errors: inability to read catalogs
Options
Connection
Supports the same options as psql: -h host, -p port, -U user, -d database, or connection strings/URLs.