Thread

  1. Re: [Proposal] Adding Log File Capability to pg_createsubscriber

    vignesh C <vignesh21@gmail.com> — 2025-12-17T10:07:09Z

    On Tue, 16 Dec 2025 at 12:31, Hayato Kuroda (Fujitsu)
    <kuroda.hayato@fujitsu.com> wrote:
    >
    > Dear Gyan,
    >
    > +1 for the idea. This point has already been discussed since the initial commit
    > [1], but it has left till now. I'm happy if you can take initiative.
    > Of course I can review your patches.
    >
    > Per my understanding, pg_upgrade puts logfiles at the directory, under
    > "${PGDATANEW}/pg_upgrade_output.d/${timestamp}". See Note part in [2].
    > I feel more straightforward way is to follow that approach:
    >
    > 1. pg_createsubscriber creates a directory pg_createsubscriber_output.d/${timestamp}.
    >    ${timestamp} has the same format as ISO 8601 (%Y%m%dT%H%M%S).
    > 2. pg_craetesubscriber saves outputs under the directory.
    > 3. Outputs can be retained when the command failed or --retain is specified.
    >    Otherwise, they are removed at the end.
    
    If I recall correctly, this was implemented that way earlier, but the
    approach was abandoned around [1]. The primary reason was that when
    users take a backup of the data directory, they would need to
    explicitly manage the exclusion of this data, which was considered
    undesirable.
    
    > Are there benefits to provide -l option?
    
    By providing this as an option, users can store the log files outside
    the data directory, eliminating the need for any additional handling
    during backups.
    
    [1] - https://www.postgresql.org/message-id/d546c4bb-92d1-4e2d-898f-48234b12ed25%40app.fastmail.com
    
    Regards,
    Vignesh