[PATCH] pg_walsummary: suppress limit output with --quiet

From: "Koshi Shibagaki (Fujitsu)" <shibagaki(dot)koshi(at)fujitsu(dot)com>
To: "'pgsql-hackers(at)lists(dot)postgresql(dot)org'" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: [PATCH] pg_walsummary: suppress limit output with --quiet
Date: 2026-10-05 03:23:37
Message-ID: TY5PR01MB18445D1AF87F64E9835BAD0B0FA962@TY5PR01MB18445.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I noticed that pg_walsummary can still print limit lines when --quiet is
specified. This happens with summaries containing relation creation or
truncation, for example:

$ pg_walsummary --quiet example.summary
TS 1663, DB 5, REL 16387, FORK main: limit 0

If I understand correctly, --quiet should suppress
all output except errors.

In dump_one_relation(), the limit line is printed before the existing
quiet check. The attached patch adds a quiet check to that output while
preserving parsing and error detection.

The patch also adds TAP coverage for -q and --quiet and checks that a
truncated input file is still rejected. The pg_walsummary tests pass
with the patch.

Feedback would be appreciated.

Koshi Shibagaki
FUJITSU LIMITED
https://www.fujitsu.com/

Attachment Content-Type Size
v1-0001-pg_walsummary-quiet.patch application/octet-stream 2.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message shihao zhong 2026-10-05 03:35:01 Re: Parallel autovacuum: DROP DATABASE WITH (FORCE) fails on the parallel workers
Previous Message Joao Detomini 2026-10-05 03:10:06 Re: pg_resetwal: refuse to run when backup_label exists