public inbox for [email protected]  
help / color / mirror / Atom feed
From: Gyan Sreejith <[email protected]>
To: Peter Smith <[email protected]>
Cc: [email protected]
Cc: vignesh C <[email protected]>
Subject: Re: [Proposal] Adding Log File Capability to pg_createsubscriber
Date: Thu, 11 Dec 2025 20:33:15 -0500
Message-ID: <CAEqnbaVNZYbB_YufchM49d=XC1ZGrVV8ikCPmGotWoCZASY3Uw@mail.gmail.com> (raw)
In-Reply-To: <CAHut+PvizcpeHA1Twf_hwe=wANQ1LV5zY6_q+39gTFJc7+bCKg@mail.gmail.com>
References: <CAEqnbaUthOQARV1dscGvB_EsqC-YfxiM6rWkVDHc+G+f4oSUHw@mail.gmail.com>
	<CAHut+PvizcpeHA1Twf_hwe=wANQ1LV5zY6_q+39gTFJc7+bCKg@mail.gmail.com>

Thanks for the feedback, Peter.

I am currently working on the SGML docs update, and will promptly get back
with an update.

For your second point, currently, all output goes directly to the console.
I thought it made more sense to break it up into multiple files depending
on what was being invoked. Do you have another opinion?

Thank you once again,
Gyan Sreejith

On Thu, Dec 11, 2025 at 2:29 AM Peter Smith <[email protected]> wrote:

> On Wed, Dec 10, 2025 at 9:17 AM Gyan Sreejith <[email protected]>
> wrote:
> >
> > Background:
> >
> > pg_createsubscriber currently outputs all messages (internal validation
> messages, standby server start/stop logs, recovery progress output, and
> output from utilities) directly to the console. As a result, users may find
> debugging and handling errors difficult. It would be more convenient if
> messages were separated and stored in different log files. There is already
> a similar implementation in pg_upgrade.
> >
> > Proposed Solution:
> >
> > Based on issues mentioned previously, I would like to propose a new
> argument -l <logdir> which can be specified for pg_createsubscriber. Using
> it would create the following log files:
> >
> > logdir/pg_createsubscriber_server.log which captures all logs related to
> starting and stopping the standby server.
> >
> > logdir/pg_createsubscriber_resetwal.log which captures the output of
> pg_resetwal
> >
> > logdir/pg_createsubscriber_internal.log which captures internal
> diagnostic output from pg_createsubscriber (validations, checks, etc.)
> >
> > Overall, this proposed solution could make the pg_createsubscriber
> command output messages more organized. The command would be easier to use
> as users will only have to read individual log files rather than parse
> through lots of possibly irrelevant output messages. I have attached the
> patch for this change.
> >
> > Special thanks to Vignesh C. for his offlist guidance on this project.
> >
> >
> > Regards, Gyan Sreejith
> >
>
> Hi Gyan.
>
> I haven't yet looked at this patch in any detail, but here are some
> quick comments:
>
> ======
>
> 1.
> + printf(_("  -l, --logdir=LOGDIR             location for the new log
> directory\n"));
>
> The patch is missing SGML docs updates for pg_createsubscriber new
> option, and any explanation of the split of logfiles.
>
> 2.
> I might be mistaken, but IIUC it seems the splitting of the logfile
> only works when --logdir is specified. Is that correct?
> Why should --logdir have any side-effect other than assigning the log
> destination folder?
>
> ======
> Kind Regards,
> Peter Smith.
> Fujitsu Australia
>


view thread (55+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: [Proposal] Adding Log File Capability to pg_createsubscriber
  In-Reply-To: <CAEqnbaVNZYbB_YufchM49d=XC1ZGrVV8ikCPmGotWoCZASY3Uw@mail.gmail.com>

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

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