Re: [Proposal] Adding Log File Capability to pg_createsubscriber
Gyan Sreejith <gyan.sreejith@gmail.com>
From: Gyan Sreejith <gyan.sreejith@gmail.com>
To: vignesh C <vignesh21@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-02-24T23:55:08Z
Lists: pgsql-hackers
Attachments
- v6-0001-Add-a-new-argument-l-logdir-to-pg_createsubscribe.patch (application/octet-stream) patch v6-0001
I have made the changes you suggested and have attached the patch below. Thanks for your help, Gyan Sreejith On Mon, Feb 16, 2026 at 4:14 AM vignesh C <vignesh21@gmail.com> wrote: > On Mon, 9 Feb 2026 at 07:38, Gyan Sreejith <gyan.sreejith@gmail.com> > wrote: > > > > I was able to make the first two changes that you suggested. However, I > was not able to get the test to run with one of the existing replica > servers. I have attached the patch for the first two changes. > > For the other comment, you don't need to add a new test case, you have > to choose one of the existing command_ok tests like: > command_ok( > [ > 'pg_createsubscriber', > '--verbose', > '--dry-run', > '--pgdata' => $node_s->data_dir, > '--publisher-server' => $node_p->connstr($db1), > '--socketdir' => $node_s->host, > '--subscriber-port' => $node_s->port, > '--replication-slot' => 'replslot1', > ], > 'run pg_createsubscriber without --databases'); > > or > > command_ok( > [ > 'pg_createsubscriber', > '--verbose', '--verbose', > '--recovery-timeout' => $PostgreSQL::Test::Utils::timeout_default, > '--pgdata' => $node_s->data_dir, > '--publisher-server' => $node_p->connstr($db1), > '--socketdir' => $node_s->host, > '--subscriber-port' => $node_s->port, > '--publication' => 'test_pub3', > '--publication' => 'pub2', > '--replication-slot' => 'replslot1', > '--replication-slot' => 'replslot2', > '--database' => $db1, > '--database' => $db2, > '--enable-two-phase', > '--clean' => 'publications', > ], > 'run pg_createsubscriber on node S'); > > Add --logdir' => $logdir option to this test and include the > verification you are doing. > > 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 →
-
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