[PATCH] pg_walsummary: suppress limit output with --quiet - Mailing list pgsql-hackers

From Koshi Shibagaki (Fujitsu)
Subject [PATCH] pg_walsummary: suppress limit output with --quiet
Date
Msg-id TY5PR01MB18445D1AF87F64E9835BAD0B0FA962@TY5PR01MB18445.jpnprd01.prod.outlook.com
Whole thread
Responses Re: [PATCH] pg_walsummary: suppress limit output with --quiet
RE: [PATCH] pg_walsummary: suppress limit output with --quiet
List 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

pgsql-hackers by date:

Previous
From: Joao Detomini
Date:
Subject: Re: pg_resetwal: refuse to run when backup_label exists
Next
From: shihao zhong
Date:
Subject: Re: Parallel autovacuum: DROP DATABASE WITH (FORCE) fails on the parallel workers