pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add some asserts based on LWLockHeldByMe() for replication slot
Date: Tue, 12 Mar 2024 22:49:01 +0000
Message-ID: <E1rkAvc-003U6r-Qr@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/77cf6a78de9fa48976d8c9152a48290beb06dc8b

Modified Files
--------------
src/backend/utils/activity/pgstat_replslot.c | 4 ++++
1 file changed, 4 insertions(+)



view thread (2+ messages)

Message-ID: <E1rkAvc-003U6r-Qr@gemulon.postgresql.org>
Permalink:  ../E1rkAvc-003U6r-Qr@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rkAvc-003U6r-Qr@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add some asserts based on LWLockHeldByMe() for replication slot
  In-Reply-To: <E1rkAvc-003U6r-Qr@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox