I understand your use case but I think it won't work like this because of how is implemented get_local_synced_slots()
this function will return slots which synced flag to true only.
Yeah. Sorry, my bad, you are absolutely right about get_local_synced_slots() function.
I didn't validate this part of the patch, because first I wanted to get feedback from hackers.
However, it looks like the people who build it never run Postgres in production and therefore don't understand the problem and the pain.
I will probably just add yet another workaround to Patroni and start dropping logical replication slots on standby with failover=true and synced=false.