Skip to content

Commit ea23c3f

Browse files
authored
Merge pull request #88 from NikolayS/refactor/rename-reports
refactor: rename reports for consistent categories
2 parents 91aeb65 + 9211d69 commit ea23c3f

File tree

7 files changed

+34
-16
lines changed

7 files changed

+34
-16
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ jobs:
127127
exit 1
128128
fi
129129
130-
echo " Testing p1_alignment_padding.sql..."
131-
OUTPUT=$(PAGER=cat psql -h localhost -U dba_user -d test --no-psqlrc -f warmup.psql -f sql/p1_alignment_padding.sql | grep align)
130+
echo " Testing x1_alignment_padding.sql..."
131+
OUTPUT=$(PAGER=cat psql -h localhost -U dba_user -d test --no-psqlrc -f warmup.psql -f sql/x1_alignment_padding.sql | grep align)
132132
if [[ "$OUTPUT" == *"align1"* && "$OUTPUT" == *"align2"* && "$OUTPUT" == *"int4, more, int8"* ]]; then
133133
echo " ✓ Alignment padding test passed"
134134
else

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ Then connect to any Postgres server via psql and type `:dba` to open the interac
4242
| b3 | Table bloat via `pgstattuple` (expensive) |
4343
| b4 | B-tree index bloat via `pgstattuple` (expensive) |
4444
| b5 | Tables and columns without stats (bloat cannot be estimated) |
45-
| b6 | Buffer cache contents (requires `pg_buffercache`, expensive) |
45+
46+
### Cache
47+
| ID | Report |
48+
|----|--------|
49+
| c1 | Buffer cache contents (requires `pg_buffercache`, expensive) |
4650

4751
### Indexes
4852
| ID | Report |
@@ -58,7 +62,11 @@ Then connect to any Postgres server via psql and type `:dba` to open the interac
5862
|----|--------|
5963
| v1 | Vacuum: current activity |
6064
| v2 | Autovacuum progress and queue |
61-
| c1 | Index creation/reindex progress |
65+
66+
### Progress
67+
| ID | Report |
68+
|----|--------|
69+
| p1 | Index creation/reindex progress |
6270

6371
### Statements
6472
| ID | Report |
@@ -73,7 +81,7 @@ Then connect to any Postgres server via psql and type `:dba` to open the interac
7381
| t1 | Postgres parameters tuning |
7482
| t2 | Objects with custom storage parameters |
7583
| e1 | Installed extensions |
76-
| p1 | Alignment padding analysis (experimental) |
84+
| x1 | Alignment padding analysis (experimental) |
7785
| r1 | Create user with random password (interactive) |
7886
| r2 | Alter user with random password (interactive) |
7987

RELEASE_NOTES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## New Reports
66

7-
### b6 — Buffer cache contents
7+
### c1 — Buffer cache contents
88
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.
99

1010
### s3 — Workload profile by query type
@@ -18,6 +18,16 @@ The node information report now includes:
1818
- **WAL**: current LSN, file count, total WAL size
1919
- **Replication Slots**: name, type, active/inactive status, lag from current WAL position
2020

21+
## Report Renames
22+
23+
Categories reorganized for consistency:
24+
25+
| Old | New | Reason |
26+
|-----|-----|--------|
27+
| b6 | **c1** | Buffer cache isn't bloat — moved to new **c** (cache) category |
28+
| c1 | **p1** | Index creation progress → **p** (progress) category |
29+
| p1 | **x1** | Alignment padding (experimental) → **x** (experimental) category |
30+
2131
## Bug Fixes
2232

2333
- **i3**: Fixed `operator is not unique` error when `intarray` extension is installed (added explicit `::int2[]` cast)

start.psql

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
\echo ' b3 – Table bloat (requires pgstattuple; expensive)'
1111
\echo ' b4 – B-tree indexes bloat (requires pgstattuple; expensive)'
1212
\echo ' b5 – Tables and columns without stats (so bloat cannot be estimated)'
13-
\echo ' b6 – Buffer cache contents (requires pg_buffercache; expensive)'
14-
\echo ' c1 – Index (re)creation progress (CREATE INDEX / REINDEX)'
13+
\echo ' c1 – Buffer cache contents (requires pg_buffercache; expensive)'
1514
\echo ' e1 – Extensions installed in current database'
1615
\echo ' i1 – Unused and rarely used indexes'
1716
\echo ' i2 – Redundant indexes'
@@ -20,7 +19,7 @@
2019
\echo ' i5 – Cleanup unused and redundant indexes – DO & UNDO migration DDL'
2120
\echo ' l1 – Lock trees (lightweight)'
2221
\echo ' l2 – Lock trees, detailed (based on pg_blocking_pids())'
23-
\echo ' p1 – [EXP] Alignment padding: how many bytes can be saved if columns are reordered?'
22+
\echo ' p1 – Index (re)creation progress (CREATE INDEX / REINDEX)'
2423
\echo ' r1 – Create user with random password (interactive)'
2524
\echo ' r2 – Alter user with random password (interactive)'
2625
\echo ' s1 – Slowest queries, by total time (requires pg_stat_statements)'
@@ -30,6 +29,7 @@
3029
\echo ' t2 – Objects with custom storage parameters'
3130
\echo ' v1 – Vacuum: current activity'
3231
\echo ' v2 – VACUUM progress and autovacuum queue'
32+
\echo ' x1 – [EXP] Alignment padding: how many bytes can be saved if columns are reordered?'
3333
\echo ' q – Quit'
3434
\echo
3535
\echo Type your choice and press <Enter>:
@@ -46,7 +46,6 @@ select
4646
:d_stp::text = 'b3' as d_step_is_b3,
4747
:d_stp::text = 'b4' as d_step_is_b4,
4848
:d_stp::text = 'b5' as d_step_is_b5,
49-
:d_stp::text = 'b6' as d_step_is_b6,
5049
:d_stp::text = 'c1' as d_step_is_c1,
5150
:d_stp::text = 'e1' as d_step_is_e1,
5251
:d_stp::text = 'i1' as d_step_is_i1,
@@ -66,6 +65,7 @@ select
6665
:d_stp::text = 't2' as d_step_is_t2,
6766
:d_stp::text = 'v1' as d_step_is_v1,
6867
:d_stp::text = 'v2' as d_step_is_v2,
68+
:d_stp::text = 'x1' as d_step_is_x1,
6969
:d_stp::text = 'q' as d_step_is_q \gset
7070
\if :d_step_is_q
7171
\echo 'Bye!'
@@ -110,12 +110,8 @@ select
110110
\ir ./sql/b5_tables_no_stats.sql
111111
\prompt 'Press <Enter> to continue…' d_dummy
112112
\ir ./start.psql
113-
\elif :d_step_is_b6
114-
\ir ./sql/b6_buffercache.sql
115-
\prompt 'Press <Enter> to continue…' d_dummy
116-
\ir ./start.psql
117113
\elif :d_step_is_c1
118-
\ir ./sql/c1_index_create_progress.sql
114+
\ir ./sql/c1_buffercache.sql
119115
\prompt 'Press <Enter> to continue…' d_dummy
120116
\ir ./start.psql
121117
\elif :d_step_is_e1
@@ -151,7 +147,7 @@ select
151147
\prompt 'Press <Enter> to continue…' d_dummy
152148
\ir ./start.psql
153149
\elif :d_step_is_p1
154-
\ir ./sql/p1_alignment_padding.sql
150+
\ir ./sql/p1_index_create_progress.sql
155151
\prompt 'Press <Enter> to continue…' d_dummy
156152
\ir ./start.psql
157153
\elif :d_step_is_r1
@@ -190,6 +186,10 @@ select
190186
\ir ./sql/v2_autovacuum_progress_and_queue.sql
191187
\prompt 'Press <Enter> to continue…' d_dummy
192188
\ir ./start.psql
189+
\elif :d_step_is_x1
190+
\ir ./sql/x1_alignment_padding.sql
191+
\prompt 'Press <Enter> to continue…' d_dummy
192+
\ir ./start.psql
193193
\else
194194
\echo
195195
\echo '\033[1;31mError:\033[0m Unknown option! Try again.'

0 commit comments

Comments
 (0)