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 <[email protected]>
Author: Hayato Kuroda <[email protected]>
Reviewed-by: vignesh C <[email protected]>
Reviewed-by: Euler Taveira <[email protected]>
Reviewed-by: shveta malik <[email protected]>
Reviewed-by: Amit Kapila <[email protected]>
Reviewed-by: Shlok Kyal <[email protected]>
Reviewed-by: Peter Smith <[email protected]>
Reviewed-by: Chao Li <[email protected]>
Discussion: 
https://postgr.es/m/caeqnbauthoqarv1dscgvb_esqc-yfxim6rwkvdhc+g+f4os...@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(-)

Reply via email to