pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_createsubscriber: Add -l/--logdir option to redirect output t
Date: Wed, 25 Mar 2026 05:58:20 +0000
Message-ID: <E1w5HFz-001LaF-1O@gemulon.postgresql.org> (raw)

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

This commit introduces a -l (or --logdir) argument to pg_createsubscriber,
allowing users to specify a directory for log files.

When enabled, a timestamped subdirectory is created within the specified
log directory, containing:

pg_createsubscriber_server.log: Captures logs from the standby server
during its start/stop cycles.
pg_createsubscriber_internal.log: Captures the tool's own internal
diagnostic and progress messages.

This ensures that transient server and utility messages are preserved for
troubleshooting after the subscriber creation process completes or errored
out.

Author: Gyan Sreejith <gyan.sreejith@gmail.com>
Author: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: vignesh C <vignesh21@gmail.com>
Reviewed-by: Euler Taveira <euler@eulerto.com>
Reviewed-by: shveta malik <shveta.malik@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Shlok Kyal <shlok.kyal.oss@gmail.com>
Reviewed-by: Peter Smith <smithpb2250@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/CAEqnbaUthOQARV1dscGvB_EsqC-YfxiM6rWkVDHc+G+f4oSUHw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6b5b7eae3ae65572e2abda20ef2b2c908527c28a

Modified Files
--------------
doc/src/sgml/ref/pg_createsubscriber.sgml          |  34 ++++
src/bin/pg_basebackup/pg_createsubscriber.c        | 194 ++++++++++++++++++++-
src/bin/pg_basebackup/t/040_pg_createsubscriber.pl |  41 ++++-
3 files changed, 257 insertions(+), 12 deletions(-)



Message-ID: <E1w5HFz-001LaF-1O@gemulon.postgresql.org>
Permalink:  ../E1w5HFz-001LaF-1O@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1w5HFz-001LaF-1O@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: akapila@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: pg_createsubscriber: Add -l/--logdir option to redirect output t
  In-Reply-To: <E1w5HFz-001LaF-1O@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox