RE: [Proposal] Adding Log File Capability to pg_createsubscriber

From: Kuroda, Hayato/黒田 隼人 <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'Gyan Sreejith' <gyan(dot)sreejith(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Euler Taveira <euler(at)eulerto(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Peter Smith <smithpb2250(at)gmail(dot)com>
Subject: RE: [Proposal] Adding Log File Capability to pg_createsubscriber
Date: 2026-03-20 11:37:55
Message-ID: TYRPR01MB12156F431E4B83ECFF14034BDF54CA@TYRPR01MB12156.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear Gyan,

Thanks for updating the patch!

While considering it further, I started to think the combination with -l and -v
is problematic.

For now, if -l and -v are set, info/debug-level messages are written only to the
file, whereas warning/error messages are written to both.
In the case of pg_upgrade, however, all additional messages are printed to both
the terminal and the file. They are similar programs, so we should follow the
spec. Also, there is another advantage that users can check the progress of the
command from INFO/DEBUG messages.

Since all comments were OK for you, I merged 0003 into 0002, and now all
messages would be printed on both stderr/log file. How do you think?

Can you also check other comments like posted on [1] and revise if needed?

[1]: https://www.postgresql.org/message-id/CABdArM54_cVUMfE2DGSnJfDBZO1hmaVb82Z4b+1t0fp+xqXaMQ@mail.gmail.com

Best regards,
Hayato Kuroda
FUJITSU LIMITED

Attachment Content-Type Size
v14-0001-pg_createsubscriber-use-own-reporting-functions.patch application/octet-stream 55.1 KB
v14-0002-Add-a-new-argument-l-logdir-to-pg_createsubscrib.patch application/octet-stream 15.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marco Nenciarini 2026-03-20 11:45:02 Re: BUG: Cascading standby fails to reconnect after falling back to archive recovery
Previous Message Amul Sul 2026-03-20 11:31:00 Re: pg_waldump: support decoding of WAL inside tarfile