|
4 | 4 |
|
5 | 5 | ## New Reports |
6 | 6 |
|
7 | | -### Corruption checks (c1, c2, c3) — powered by `amcheck` |
| 7 | +### Corruption checks (c1–c4) — powered by `amcheck` |
8 | 8 |
|
9 | | -Three levels of integrity checking, all requiring `CREATE EXTENSION amcheck`: |
| 9 | +Four levels of integrity checking, from quick production-safe to full paranoia: |
10 | 10 |
|
11 | 11 | | Report | Lock | What it checks | When to use | |
12 | 12 | |--------|------|----------------|-------------| |
13 | 13 | | **c1** | AccessShareLock | B-tree pages, GIN indexes (PG18+) | **Production** — fast, safe, non-blocking | |
14 | 14 | | **c2** | AccessShareLock | c1 + heap/TOAST integrity (PG14+) | **Production** — safe but reads all data | |
15 | | -| **c3** | ShareLock ⚠️ | B-tree parent-child ordering, sibling pointers, rootdescend, checkunique (PG14+) | **Clones or standbys** — detects glibc/collation corruption | |
16 | | -| **c4** | ShareLock ⚠️⚠️ | Everything in c3 + heapallindexed + verify_heapam with full TOAST | **Clones only** — proves every heap tuple is indexed, slow on large DBs | |
| 15 | +| **c3** | ShareLock | B-tree parent-child ordering, sibling pointers, rootdescend, checkunique (PG14+) | **Clones** — detects glibc/collation corruption | |
| 16 | +| **c4** | ShareLock | Everything in c3 + heapallindexed + verify_heapam with full TOAST | **Clones only** — proves every heap tuple is indexed, slow | |
17 | 17 |
|
18 | | -All three check system catalog indexes (`pg_catalog`, `pg_toast`) — because catalog corruption is the scariest kind. |
| 18 | +All four check system catalog indexes (`pg_catalog`, `pg_toast`). |
19 | 19 |
|
20 | | -Robustness: |
21 | | -- Graceful handling when `amcheck` extension is not installed |
22 | | -- No false corruption reports on insufficient privileges (reports skipped count) |
23 | | -- Version-conditional: uses appropriate function signatures for PG11–18 |
24 | | -- GIN support via `gin_index_check()` on PostgreSQL 18+ |
| 20 | +Requires `CREATE EXTENSION amcheck`. Graceful handling when extension is missing or user lacks privileges. Version-conditional function signatures for PG11–18. GIN support via `gin_index_check()` on PG18+. |
25 | 21 |
|
26 | 22 | ### m1 — Buffer cache contents |
27 | | -What's in your `shared_buffers` right now. Shows cached size vs total size, % of cache used per object, and dirty buffer counts. Requires `pg_buffercache` extension. |
| 23 | +What's in `shared_buffers`: cached size vs total, % of cache per object, dirty buffer counts. Includes system catalogs. Requires `pg_buffercache`. |
28 | 24 |
|
29 | 25 | ### s3 — Workload profile by query type |
30 | | -Groups `pg_stat_statements` by first SQL keyword (SELECT, INSERT, UPDATE, DELETE, etc.) to show workload composition at a glance. Correctly handles queries with leading block comments (`/* ... */`) and line comments (`-- ...`). |
| 26 | +Groups `pg_stat_statements` by first SQL keyword (SELECT, INSERT, UPDATE, DELETE, etc.). Handles leading block comments (`/* ... */`) and line comments (`-- ...`). |
31 | 27 |
|
32 | 28 | ### t2 — Objects with custom storage parameters |
33 | | -Lists all tables, indexes, and materialized views with non-default `reloptions`. Flags potentially problematic settings: disabled autovacuum on large tables, low fillfactor, aggressive vacuum scale factors. Shows partition relationships. |
| 29 | +Tables, indexes, and materialized views with non-default `reloptions`. Flags: disabled autovacuum on large tables, low fillfactor, aggressive vacuum scale factors. |
34 | 30 |
|
35 | 31 | ### Report 0 — WAL and replication slot info |
36 | | -The node information report now includes: |
37 | | -- **WAL**: current LSN, file count, total WAL size |
38 | | -- **Replication Slots**: name, type, active/inactive status, lag from current WAL position |
| 32 | +Node information now includes WAL position, file count, total WAL size, and replication slot status. |
39 | 33 |
|
40 | 34 | ## Report Renames |
41 | 35 |
|
42 | | -Categories reorganized for consistency: |
43 | | - |
44 | 36 | | Old | New | Reason | |
45 | 37 | |-----|-----|--------| |
46 | 38 | | b6 | **m1** | Buffer cache → **m** (memory) category | |
47 | 39 | | c1 | **p1** | Index creation progress → **p** (progress) category | |
48 | | -| p1 | **x1** | Alignment padding (experimental) → **x** (experimental) category | |
| 40 | +| p1 | **x1** | Alignment padding → **x** (experimental) category | |
| 41 | + |
| 42 | +v1/v2 descriptions clarified: v1 is "running operations (detailed progress)", v2 is "autovacuum queue and pending tables". |
49 | 43 |
|
50 | 44 | ## Bug Fixes |
51 | 45 |
|
52 | | -- **i3**: Fixed `operator is not unique` error when `intarray` extension is installed (added explicit `::int2[]` cast) |
| 46 | +- **s1, s2**: Fixed `blk_read_time does not exist` on PG17+ (renamed to `shared_blk_read_time` in pg_stat_statements 1.11) |
53 | 47 | - **s3**: Fixed `function round(double precision, integer) does not exist` — added `::numeric` casts |
54 | | -- **i2**: Removed unused `redundant_indexes_grouped` CTE (dead code) |
55 | | -- **s1**: Removed duplicate `sum(calls)` in the pre-PG13 code path |
| 48 | +- **i3**: Fixed `operator is not unique` error when `intarray` extension is installed |
| 49 | +- **m1**: Include system catalogs in buffer cache report (was showing empty on small databases) |
| 50 | +- **i2**: Removed dead code (`redundant_indexes_grouped` CTE) |
| 51 | +- **s1**: Removed duplicate `sum(calls)` in pre-PG13 code path |
56 | 52 |
|
57 | 53 | ## Terminology |
58 | 54 |
|
59 | | -- Updated `Master` → `Primary` across all reports and CI (0_node, i2, i4, i5) |
60 | | - |
61 | | -## Typo Fixes |
62 | | - |
63 | | -- `inspect` → `inspects` (b1, b2) |
64 | | -- `filed` → `fields`, `fractionnal` → `fractional`, `functionnal` → `functional` (b2) |
65 | | -- `alt_shits` → `alt_shifts` (p1) 🙈 |
66 | | -- `Vaccuum` → `Vacuum` (b1) |
67 | | -- `format` → `formatting` (s2) |
68 | | -- Comment formatting: added space after `--` throughout (b3, b4, l1, s2, v2) |
| 55 | +`Master` → `Primary` across all reports and CI. |
69 | 56 |
|
70 | | -## CI Improvements |
| 57 | +## Other Improvements |
71 | 58 |
|
72 | | -- Added `PAGER=cat` to all `psql` invocations (prevents pager hangs) |
73 | | -- Added `intarray`, `pg_buffercache`, and `amcheck` extensions to test matrix |
74 | | -- Added foreign key test tables for i3 regression testing |
75 | | -- Added dedicated i3 regression test with `intarray` installed |
| 59 | +- Modernized README with badges, individual credits, optional extensions table |
| 60 | +- Fixed Quick Start psqlrc escaping |
| 61 | +- Fixed menu spacing for new reports |
| 62 | +- `alt_shits` → `alt_shifts` (p1) |
| 63 | +- Various typo fixes across b1, b2, b3, b4, l1, s2, v2 |
76 | 64 |
|
77 | | -## Compatibility |
| 65 | +## CI |
78 | 66 |
|
79 | | -Tested on PostgreSQL 13, 14, 15, 16, 17, and 18 — all 34 reports pass with both superuser and `pg_monitor` roles. |
| 67 | +- All 34 reports tested on PG 13, 14, 15, 16, 17, 18 |
| 68 | +- Added `amcheck`, `intarray`, `pg_buffercache` extensions to test matrix |
| 69 | +- Added i3 regression test with `intarray` installed |
| 70 | +- Added `PAGER=cat` to prevent pager hangs |
0 commit comments