On 2026-Sep-25 at 05:54 UTC, Bertrand Drouvot wrote:
> ReplicationSlotPersistInvalidation() has a narrower contract and is only
> intended for persistent or temporary slots.
Since this function also handles temporary slots, could we qualify
the following sentence in 0002's commit message?
> A failed save now leaves the local slot valid, allowing the next
> synchronization to retry.
Could we change that to:
A failed save now leaves a persistent local slot valid, allowing the
next synchronization to retry.
I suggest adding "persistent" because SQL error cleanup deletes
temporary synchronized slots. In my v6 test:
1. I ran pg_sync_replication_slots() on the standby. The local
pending_slot remained temporary because the primary slot's
restart_lsn was behind the standby slot's restart_lsn.
2. While that call was still running, I made
pg_replslot/pending_slot/state.tmp a directory on the standby, then
invalidated pending_slot on the primary (wal_removed).
Synchronization then tried to save that invalidation on the standby.
The save failed with "File exists", and error cleanup deleted the
temporary slot.
3. I called pg_sync_replication_slots() again in the same connection.
It completed without error but did not recreate pending_slot because
the primary slot was already invalidated.
Regards,
Rui