Re: [Proposal] Adding Log File Capability to pg_createsubscriber
Gyan Sreejith <gyan.sreejith@gmail.com>
From: Gyan Sreejith <gyan.sreejith@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Euler Taveira <euler@eulerto.com>, vignesh C <vignesh21@gmail.com>, "kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>,
Peter Smith <smithpb2250@gmail.com>
Date: 2026-03-09T22:55:56Z
Lists: pgsql-hackers
Attachments
- v7-0001-Add-a-new-argument-l-logdir-to-pg_createsubscribe.patch (application/octet-stream) patch v7-0001
On Thu, Mar 5, 2026 at 9:49 AM Euler Taveira <euler@eulerto.com> wrote: Don't duplicate code. If you are reusing a function, my advice is to move > it to > src/common. You can always use "ifdef FRONTEND" to use the appropriate log > message (elog/ereport vs pg_error, for example). I have made all the changes except for this one, and I am deferring to Amit Kapila regarding the marks. Regarding duplicating code - I was trying to keep the change contained. Is it okay to make that change in a separate check in since it would also touch src/backend/postmaster/syslogger.c? Thank you! Gyan Sreejith On Fri, Mar 6, 2026 at 5:51 AM Amit Kapila <amit.kapila16@gmail.com> wrote: > On Thu, Mar 5, 2026 at 8:19 PM Euler Taveira <euler@eulerto.com> wrote: > > > > One of the arguments to have this feature was that pg_createsubscriber > mixes the > > server and tool messages. Couldn't we fix it adding "marks" on the > output saying > > the server log messages starts here and the server log messages ends > here? > > > > It will simplify the output to some extent but still it will be mixed > at different intervals in the LOG which is not good for grepping > required info. Also, I am not sure if we use such markers at other > places. > > -- > With Regards, > Amit Kapila. >
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