| From: | Fabrice Chapuis <fabrice636861(at)gmail(dot)com> |
|---|---|
| To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
| Cc: | "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: failover logical replication slots |
| Date: | 2025-06-12 10:23:24 |
| Message-ID: | CAA5-nLCozHs-XQpF=tVc2MOa9T96_dac77O2oJaNCTcX2g2qrw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
However, the problem still persists: it is currently not possible to
perform an automatic switchover after creating a new subscription.
Would it be reasonable to consider adding a GUC to address this issue?
I can propose a patch in that sense if it seems appropriate.
What is your opinion
Regards,
Fabrice
On Thu, Jun 12, 2025 at 11:37 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
wrote:
> On Thu, Jun 12, 2025 at 2:32 PM Fabrice Chapuis <fabrice636861(at)gmail(dot)com>
> wrote:
> >
> > Thanks for the reply Amit,
> >
> > I don't really understand the logic of the implementation. If the slot
> name matches that of the primary slot and this slot is in failover mode,
> how could it be any different on the standby slot?
> >
>
> On the standby's we do allow creating logical slots (For example, one
> can use pg_create_logical_replication_slot()). So, the same name slot
> can be created on standby by the user before we start sync. As of now,
> we don't allow setting the failover option for slots on standby's but
> in future, it could be supported to allow syncing slots from standbys
> (something like cascaded replication).
>
> > After the first failover, the following failovers will work given that
> the sync flag is true on both the primary and standby slots.
> >
> > After new sandby is attached to the primary, can we imagine that when
> the sync worker process is started we check if a failover slot exists on
> the standby, if so we drop it before recreating a new one for syncing?
> >
>
> This has the risk of dropping an unwarranted slot.
>
> --
> With Regards,
> Amit Kapila.
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Etsuro Fujita | 2025-06-12 10:29:34 | Re: Proposal to allow DELETE/UPDATE on partitioned tables with unsupported foreign partitions |
| Previous Message | Amit Kapila | 2025-06-12 10:05:56 | Re: failover logical replication slots |