Re: Enhance pg_createsubscriber to create required standby.

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: 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-04 09:09:45
Message-ID: 2098beab-1c25-41b8-9feb-d91556c55556@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04.06.25 05:56, Shubham Khanna wrote:
> Currently, pg_createsubscriber is designed to convert an existing
> physical replica into a logical subscriber. To use it, the user must
> manually set up a standby node beforehand, ensure that physical
> replication is active, and only then run pg_createsubscriber to
> perform the switchover to logical replication.
> To simplify this workflow, I propose enhancing the pg_createsubscriber
> utility to handle the creation of the standby node as part of the
> pg_createsubscriber itself.

Yes, this was contemplated when pg_createsubscriber was first proposed.
We opted against it, mainly for simplicity initially.

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. And then you'd have the maintenance
overhead that every new feature in pg_basebackup would potentially have
to be passed through or somehow be integrated into pg_createsubscriber.

I think I prefer the "one tool for one job" approach for this. But
maybe there is some advantage here that I'm not seeing.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2025-06-04 09:17:46 Re: Custom Glibc collation version strings under LOCPATH
Previous Message Florents Tselai 2025-06-04 08:17:42 Re: like pg_shmem_allocations, but fine-grained for DSM registry ?