Re: Enhance pg_createsubscriber to create required standby. - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Enhance pg_createsubscriber to create required standby.
Date
Msg-id CAA4eK1KeEy0oXX2kvvGo67B+QH9tv-e1CK7Y4KrVZNe6Ux1LAg@mail.gmail.com
Whole thread Raw
In response to Re: Enhance pg_createsubscriber to create required standby.  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: Enhance pg_createsubscriber to create required standby.
List pgsql-hackers
On Thu, Jun 5, 2025 at 1:50 AM Peter Eisentraut <peter@eisentraut.org> wrote:
>
> On 04.06.25 11:56, Amit Kapila wrote:
> >> It's not clear to me how this change now would substantially improve the
> >> user experience.  The number of characters you type is approximately the
> >> same.  You still need to support the old mode because the backup might
> >> not come from pg_basebackup.
> >
> > In the current functionality, the user must first manually create a
> > standby or use an existing standby to make it a subscriber. I thought
> > saving this step for users would be quite helpful. It also helps
> > streamline the process into a single, cohesive workflow.
>
> Unless I'm missing something, doesn't this merely replace
>
> pg_basebackup && pg_createsubscriber
>
> with
>
> pg_createsubscriber --create-standby
>
> I mean, as I'm typing this out, this is literally the same number of
> characters.  Is the second one easier somehow?  It's not clear.
>

As shown in Vignesh's email [1] (point 4), there could be multiple
additional parameters required for the first option suggested by you,
which will make it longer. Additionally, there are some other benefits
of having the second option (pg_createsubscriber --create-standby),
like better cleanup of contents during failures and better progress
reporting. Are you still against adding such an option?

[1]: https://www.postgresql.org/message-id/CALDaNm1biZBMOzFMfHYzqrAeosJSD5YRG%3D82-pp6%2BJhALsfe6w%40mail.gmail.com

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: shveta malik
Date:
Subject: Re: POC: enable logical decoding when wal_level = 'replica' without a server restart
Next
From: Amit Kapila
Date:
Subject: Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.