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.kapil...@gmail.com> wrote: > On Thu, Jun 12, 2025 at 2:32 PM Fabrice Chapuis <fabrice636...@gmail.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. >