Skip to content

Commit 9cce769

Browse files
committed
Fix menu: remove emojis, fix extra space in descriptions
- Strip leading space after -- in generate.sh (s/^-- *//g) - Remove emoji from c3/c4 first-line comments
1 parent ac007c4 commit 9cce769

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

init/generate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ echo "\\echo '\\033[1;35mMenu:\\033[0m'" >> "$OUT"
5252
for f in ./sql/*.sql
5353
do
5454
prefix=$(echo $f | sed -e 's/_.*$//g' -e 's/^.*\///g')
55-
desc=$(head -n1 $f | sed -e 's/^--//g')
55+
desc=$(head -n1 $f | sed -e 's/^-- *//g')
5656
printf "%s '%4s – %s'\n" "\\echo" "$prefix" "$desc" >> "$OUT"
5757
done
5858
printf "%s '%4s – %s'\n" "\\echo" "q" "Quit" >> "$OUT"

sql/c3_amcheck_parent.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- Corruption: B-tree parent check — detects glibc/collation corruption (⚠️ ShareLock, use on clones)
1+
-- Corruption: B-tree parent check — detects glibc/collation corruption (ShareLock, use on clones)
22
-- Requires: CREATE EXTENSION amcheck
33
-- ⚠️ Takes ShareLock on each index — blocks writes while checking!
44
-- ⚠️ Best used on clones (e.g., restored from backup) or standbys.

sql/c4_amcheck_full.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- Corruption: FULL check — heapallindexed + parent + heap (⚠️⚠️ SLOW + ShareLock, use on clones)
1+
-- Corruption: FULL check — heapallindexed + parent + heap (SLOW + ShareLock, use on clones)
22
-- Requires: CREATE EXTENSION amcheck
33
-- ⚠️⚠️ HEAVY: Takes ShareLock AND scans entire heap for each index!
44
-- ⚠️⚠️ This WILL be slow on large databases. Use on clones (e.g., restored from backup).

start.psql

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
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 ' c1 – Corruption: quick index check — btree + GIN (PG18+). Safe for production, fast.'
14-
\echo ' c2 – Corruption: indexes + heap/TOAST check. Safe for production but reads all data.'
15-
\echo ' c3 – Corruption: B-tree parent check — detects glibc/collation corruption (⚠️ ShareLock, use on clones)'
16-
\echo ' c4 – Corruption: FULL check — heapallindexed + parent + heap (⚠️⚠️ SLOW + ShareLock, use on clones)'
13+
\echo ' c1 – Corruption: quick index check — btree + GIN (PG18+). Safe for production, fast.'
14+
\echo ' c2 – Corruption: indexes + heap/TOAST check. Safe for production but reads all data.'
15+
\echo ' c3 – Corruption: B-tree parent check — detects glibc/collation corruption (ShareLock, use on clones)'
16+
\echo ' c4 – Corruption: FULL check — heapallindexed + parent + heap (SLOW + ShareLock, use on clones)'
1717
\echo ' e1 – Extensions installed in current database'
1818
\echo ' i1 – Unused and rarely used indexes'
1919
\echo ' i2 – Redundant indexes'
@@ -22,15 +22,15 @@
2222
\echo ' i5 – Cleanup unused and redundant indexes – DO & UNDO migration DDL'
2323
\echo ' l1 – Lock trees (lightweight)'
2424
\echo ' l2 – Lock trees, detailed (based on pg_blocking_pids())'
25-
\echo ' m1 – Buffer cache contents (requires pg_buffercache; expensive on large shared_buffers)'
25+
\echo ' m1 – Buffer cache contents (requires pg_buffercache; expensive on large shared_buffers)'
2626
\echo ' p1 – Index (re)creation progress (CREATE INDEX / REINDEX)'
2727
\echo ' r1 – Create user with random password (interactive)'
2828
\echo ' r2 – Alter user with random password (interactive)'
2929
\echo ' s1 – Slowest queries, by total time (requires pg_stat_statements)'
3030
\echo ' s2 – Slowest queries report (requires pg_stat_statements)'
31-
\echo ' s3 – Workload profile by query type (requires pg_stat_statements)'
31+
\echo ' s3 – Workload profile by query type (requires pg_stat_statements)'
3232
\echo ' t1 – Postgres parameters tuning'
33-
\echo ' t2 – Objects with custom storage parameters'
33+
\echo ' t2 – Objects with custom storage parameters'
3434
\echo ' v1 – Vacuum: current activity'
3535
\echo ' v2 – VACUUM progress and autovacuum queue'
3636
\echo ' x1 – [EXP] Alignment padding: how many bytes can be saved if columns are reordered?'

0 commit comments

Comments
 (0)