pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use LW_SHARED in dsa.c where possible.
Date: Tue, 02 Dec 2025 22:40:48 +0000
Message-ID: <E1vQZ39-002Uru-1g@gemulon.postgresql.org> (raw)

Use LW_SHARED in dsa.c where possible.

Both dsa_get_total_size() and dsa_get_total_size_from_handle() take
an exclusive lock just to read a variable.  This commit reduces the
lock level to LW_SHARED in those functions.

Reviewed-by: Sami Imseih <samimseih@gmail.com>
Discussion: https://postgr.es/m/aS8fMzWs9e8iHxk2%40nathan

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a6d05c819380b0940fcfb428aa298f2d7e76e5c6

Modified Files
--------------
src/backend/utils/mmgr/dsa.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



Message-ID: <E1vQZ39-002Uru-1g@gemulon.postgresql.org>
Permalink:  ../E1vQZ39-002Uru-1g@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vQZ39-002Uru-1g@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: nathan@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Use LW_SHARED in dsa.c where possible.
  In-Reply-To: <E1vQZ39-002Uru-1g@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