Re: [Proposal] Adding Log File Capability to pg_createsubscriber

vignesh C <vignesh21@gmail.com>

From: vignesh C <vignesh21@gmail.com>
To: Gyan Sreejith <gyan.sreejith@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, Euler Taveira <euler@eulerto.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-01-30T04:49:55Z
Lists: pgsql-hackers
On Mon, 26 Jan 2026 at 07:08, Gyan Sreejith <gyan.sreejith@gmail.com> wrote:
>
> Thank you, I have made the changes and attached the patch.

Currently the files are created like this with the v3 patch:
If -l logdir is specified:
logdir
├── pg_createsubscriber_internal_2026-01-30-10-00-58.300264.log
├── pg_createsubscriber_server_2026-01-30-10-00-58.300264.log
├── pg_createsubscriber_internal_2026-01-30-10-08-54.270230.log
└── pg_createsubscriber_server_2026-01-30-10-08-54.270230.log

You might have slightly misunderstood my previous comment, but the
expected is like:
logdir
├── 20260130T100618.912
│   ├── pg_createsubscriber_internal.log
│   └── pg_createsubscriber_server.log
└── 20260130T101320.952
    ├── pg_createsubscriber_internal.log
    └── pg_createsubscriber_server.log

Let's keep the similar structure as created by pg_upgrade. You can
execute pg_upgrade once see how it is created. You can refer to
make_outputdirs for the same.

Regards,
Vignesh



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. pg_createsubscriber: Don't use MAXPGPATH

  2. pg_createsubscriber: Remove separate logfile_open() function

  3. pg_createsubscriber: Use logging.c log file callback

  4. Add log file support to logging.c

  5. pg_createsubscriber: Add -l/--logdir option to redirect output to files.

  6. pg_createsubscriber: Introduce module-specific logging functions.

  7. Fix another buglet in archive_waldump.c.