pgsql: pg_createsubscriber: Add -l/--logdir option to redirect output t

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pg_createsubscriber: Add -l/--logdir option to redirect output t
Date: 2026-03-25 05:58:20
Message-ID: E1w5HFz-001LaF-1O@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(dot)sreejith(at)gmail(dot)com>
Author: Hayato Kuroda <kuroda(dot)hayato(at)fujitsu(dot)com>
Reviewed-by: vignesh C <vignesh21(at)gmail(dot)com>
Reviewed-by: Euler Taveira <euler(at)eulerto(dot)com>
Reviewed-by: shveta malik <shveta(dot)malik(at)gmail(dot)com>
Reviewed-by: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Reviewed-by: Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>
Reviewed-by: Peter Smith <smithpb2250(at)gmail(dot)com>
Reviewed-by: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2026-03-25 06:16:20 pgsql: Fix typo
Previous Message John Naylor 2026-03-25 05:33:26 pgsql: Refactor handling of x86 CPUID instructions