| From: | "Koshi Shibagaki (Fujitsu)" <shibagaki(dot)koshi(at)fujitsu(dot)com> |
|---|---|
| To: | "masao(dot)fujii(at)gmail(dot)com" <masao(dot)fujii(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com> |
| Cc: | "'pgsql-hackers(at)lists(dot)postgresql(dot)org'" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [PATCH] pg_walsummary: suppress limit output with --quiet |
| Date: | 2026-10-05 08:46:02 |
| Message-ID: | TY5PR01MB184455CF53F66D5A4E11C6756FA962@TY5PR01MB18445.jpnprd01.prod.outlook.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Fujii-san, Kuroda-san,
Thank you both for reviewing the patch.
> Testing both forms with the same input and expected output seems a bit
> overkill for this fix, since both set the same flag. Isn't testing just
> one of them be sufficient?
> I feel it's enough to call command_checks_all() once, thought?
Agreed. In v2, I kept only the -q test, so command_checks_all() is
called once.
> Isn't this primarily adding test coverage for existing quiet-mode behavior,
> rather than testing the bug being fixed? If so, it might be better to leave
> this out of the bug-fix patch intended for backpatching. Thought?
Agreed. I removed the truncated-file test.
> It might be matter of taste, but how about moving printf() after the
> `if (opt->quiet)`? The code might be clearer.
I moved the limit-block printf() after the quiet check.
> Also, this fix should be backpatched to v17, where pg_walsummary was
> introduced?
Agreed. I tested the updated patch against REL_17_STABLE and
REL_18_STABLE, and the pg_walsummary test suite passes on both.
The patch applies cleanly to REL_18_STABLE. On REL_17_STABLE, the
code change applies cleanly, but the test needs a small context
adjustment because that branch does not contain the pg_stat_io check.
Regards,
Koshi Shibagaki
FUJITSU LIMITED
https://www.fujitsu.com/
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-pg_walsummary-quiet.patch | application/octet-stream | 2.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Geier | 2026-10-05 08:51:51 | Re: Improving scalability of Parallel Bitmap Heap/Index Scan |
| Previous Message | Etsuro Fujita | 2026-10-05 08:22:54 | Re: postgres_fdw: transaction mode inheritance corner cases |