Re: Spurious pgstat_drop_replslot() call
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2024-03-12T05:36:58Z
Lists: pgsql-hackers
Attachments
- slot-stats-asserts.patch (text/x-diff) patch
On Mon, Mar 11, 2024 at 04:15:40PM +0900, Michael Paquier wrote: > That's a slight change in behavior, unfortunately, and it cannot be > called a bug as this improves the visibility of the stats after an > invalidation, so this is not something that can be backpatched. I've looked again at that and that was OK on a second look. May I suggest the attached additions with LWLockHeldByMeInMode to make sure that the stats are dropped and created while we hold ReplicationSlotAllocationLock? -- Michael
Commits
-
Add some asserts based on LWLockHeldByMe() for replication slot statistics
- 77cf6a78de9f 17.0 landed
-
Keep replication slot statistics on invalidation
- d6e171fed6c5 17.0 landed