Re: Enhance pg_createsubscriber to create required standby.

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Shubham Khanna <khannashubham1197(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Enhance pg_createsubscriber to create required standby.
Date: 2025-06-18 04:21:51
Message-ID: CAA4eK1KeEy0oXX2kvvGo67B+QH9tv-e1CK7Y4KrVZNe6Ux1LAg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 5, 2025 at 1:50 AM Peter Eisentraut <peter(at)eisentraut(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2025-06-18 04:22:12 Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.
Previous Message shveta malik 2025-06-18 04:07:34 Re: POC: enable logical decoding when wal_level = 'replica' without a server restart