From: | Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> |
---|---|
To: | shveta malik <shveta(dot)malik(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com> |
Subject: | Re: Using failover slots for PG-non_PG logical replication |
Date: | 2025-07-02 12:20:18 |
Message-ID: | CAExHW5toZS=6KX+RjCmuo4L6JbkDBp8fMKhAANC9MWUAYLz1Ng@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jul 2, 2025 at 12:36 PM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
>
> On Wed, Jul 2, 2025 at 10:50 AM Ashutosh Bapat
> <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
> >
> > Hi All,
> >
> > The failover slots documentation [1] is good for PG - PG logical
> > replication, but the first two queries require pg_subscription which
> > may not be present in non-PG downstream. Somebody looking to setup
> > failover slots for non-PG subscriber may not find the page useful.
>
> Okay. It appears to me that the entire document at [1] is
> specifically intended for a built-in replication setup, and the
> corresponding page was written with that context in mind.
>
> > However, the third query, when modified to mention the replication
> > slots relevant to the downstream is useful to them. How to find the
> > replication slots to be synchronized is a problem specific to the type
> > of downstream. Such a setup should add those slots to
> > sync_replication_slots. I think the chapter should mention that the
> > 3rd query should also include the slots mentioned in
> > sync_replication_slots for PG-non_PG logical replication setup.
> >
>
> sync_replication_slots is a boolean which enables a physical standby
> to synchronize logical failover slots. Did you mean something else?
I confused this with the actual list of slots to be synchronized.
Sorry for that. The slots to be synchronized can be obtained from the
primary by querying pg_replication_slots with failover = true.
>
> We could include a general note in the documentation something like:
> 'For non-native replication, it is the responsibility of the plugin
> author to define the required slots'. Then, we can directly use the
> third query. Thoughts?
Something like that would work. However, a non-PG subscriber may use
the built-in plugin for PG-non_PG, so it's more of a responsibility of
the downstream or user than the plugin. It may help further if we
mention that in such a case where pg_subscriber is not available, the
slots to be synchronized can be obtained from the primary by querying
pg_replication_slots with failover = true.
--
Best Wishes,
Ashutosh Bapat
From | Date | Subject | |
---|---|---|---|
Next Message | Ashutosh Bapat | 2025-07-02 12:35:37 | Re: Changing shared_buffers without restart |
Previous Message | Peter Eisentraut | 2025-07-02 11:44:55 | Re: libpq OpenSSL and multithreading |