From 76ae1351cebd74bcb53f3ef338e3f4cb29557cac Mon Sep 17 00:00:00 2001 From: tegwick Date: Thu, 26 Feb 2026 07:25:59 +0100 Subject: [PATCH] fix: correct pg_stat_user_tables column name in restore drill (relname not tablename) Co-Authored-By: Claude Sonnet 4.6 --- docs/backup-restore.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/backup-restore.md b/docs/backup-restore.md index 440c4b3..9f4b612 100644 --- a/docs/backup-restore.md +++ b/docs/backup-restore.md @@ -172,7 +172,7 @@ Verify row counts look sane: ```bash docker exec infra-postgres-1 psql -U custodian custodian \ - -c "SELECT schemaname, tablename, n_live_tup FROM pg_stat_user_tables ORDER BY n_live_tup DESC;" + -c "SELECT relname, n_live_tup FROM pg_stat_user_tables WHERE n_live_tup > 0 ORDER BY n_live_tup DESC;" ``` ### Step 4 — Restore config files @@ -251,7 +251,7 @@ age --decrypt \ # 3. Check row counts docker exec restore-test psql -U custodian custodian \ - -c "SELECT tablename, n_live_tup FROM pg_stat_user_tables ORDER BY n_live_tup DESC;" + -c "SELECT relname, n_live_tup FROM pg_stat_user_tables WHERE n_live_tup > 0 ORDER BY n_live_tup DESC;" # 4. Clean up docker rm -f restore-test