avoid false dropped replication slot log messages

Started by Lakshmi N16 days ago1 messageshackers
Jump to latest
#1Lakshmi N
lakshmin.jhs@gmail.com

Hi hackers,

If the shared-memory entry for a synced slot is concurrently reused by
a user-created slot in the small window between rm collecting the candidate
list and locking the database, drop_local_obsolete_slots() correctly
skips the drop but still emitted a LOG message claiming the slot had
been dropped, naming the unrelated user slot.

Gate the LOG message on the same synced_slot check that gates the drop,
and snapshot the slot name and database OID before calling
ReplicationSlotDropAcquired() so the message reflects what was actually
dropped

Regards,
Lakshmi

Attachments:

0001-slotsync-avoid-false-dropped-replication-slot-log-me.patchapplication/octet-stream; name=0001-slotsync-avoid-false-dropped-replication-slot-log-me.patchDownload+24-8