Add some asserts based on LWLockHeldByMe() for replication slot statistics
Michael Paquier <michael@paquier.xyz>
Add some asserts based on LWLockHeldByMe() for replication slot statistics Two assertions checking that ReplicationSlotAllocationLock is acquired are added to pgstat_create_replslot() and pgstat_drop_replslot(), corresponding to the routines in charge of the creation and the drop of replication slot statistics. The code previously relied on this assumption and documented it in comments, but did not enforce this policy at runtime. Reviewed-by: Bertrand Drouvot Discussion: https://postgr.es/m/Ze_p-hmD_yFeVYXg@paquier.xyz
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/activity/pgstat_replslot.c | modified | +4 −0 |
Discussion
- Spurious pgstat_drop_replslot() call 9 messages · 2024-03-08 → 2024-03-12