RE: [Proposal] Adding Log File Capability to pg_createsubscriber
(unknown)
From: Kuroda, Hayato/黒田 隼人 <kuroda.hayato@fujitsu.com>
To: 'Gyan Sreejith' <gyan.sreejith@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, Shlok Kyal <shlok.kyal.oss@gmail.com>, vignesh C <vignesh21@gmail.com>, Euler Taveira <euler@eulerto.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, Peter Smith <smithpb2250@gmail.com>
Date: 2026-03-20T11:37:55Z
Lists: pgsql-hackers
Attachments
- v14-0001-pg_createsubscriber-use-own-reporting-functions.patch (application/octet-stream) patch v14-0001
- v14-0002-Add-a-new-argument-l-logdir-to-pg_createsubscrib.patch (application/octet-stream) patch v14-0002
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
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
pg_createsubscriber: Don't use MAXPGPATH
- 99b726ac4894 19 (unreleased) landed
-
pg_createsubscriber: Remove separate logfile_open() function
- f5528b90b411 19 (unreleased) landed
-
pg_createsubscriber: Use logging.c log file callback
- 847336ba53af 19 (unreleased) landed
-
Add log file support to logging.c
- 41237556f8c5 19 (unreleased) landed
-
pg_createsubscriber: Add -l/--logdir option to redirect output to files.
- 6b5b7eae3ae6 19 (unreleased) landed
-
pg_createsubscriber: Introduce module-specific logging functions.
- d6628a5ea0a5 19 (unreleased) landed
-
Fix another buglet in archive_waldump.c.
- 69c57466a752 19 (unreleased) cited