On Thu, Jan 4, 2024 at 9:18 PM Euler Taveira <eu...@eulerto.com> wrote: > > On Thu, Jan 4, 2024, at 2:41 AM, Amit Kapila wrote: > > > I think asking users to manually remove such slots won't be a good > idea. We might want to either remove them by default or provide an > option to the user. > > > Am I correct that the majority of the use cases these replication slots will > be > useless? >
I am not so sure about it. Say, if some sync slots are present this means the user wants this replica to be used later as a publisher. Now, if the existing primary/publisher node is still alive then we don't have these slots but if the user wants to switch over to this new node as well then they may be required. Is there a possibility that a cascading standby also has a slot on the current physical replica being converted to a new subscriber? > If so, let's remove them by default and add an option to control this > behavior (replication slot removal). > The presence of slots on the physical replica indicates that the other nodes/clusters could be dependent on it, so, I feel by default we should give an error and if the user uses some option to remove slots then it is fine to remove them. -- With Regards, Amit Kapila.