pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Masahiko Sawada <msawada@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use LW_SHARED in walsummarizer.c for WALSummarizerLock lock wher
Date: Fri, 29 Aug 2025 00:07:57 +0000
Message-ID: <E1urmeq-0029CL-1L@gemulon.postgresql.org> (raw)

Use LW_SHARED in walsummarizer.c for WALSummarizerLock lock where possible.

Previously, we used LW_EXCLUSIVE in several places despite only reading
WalSummarizerCtl fields. This patch reduces the lock level to LW_SHARED
where we are only reading the shared fields.

Backpatch to 17, where wal summarization was introduced.

Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Discussion: https://postgr.es/m/CAD21AoDdKhf_9oriEYxY-JCdF+Oe_muhca3pcdkMEdBMzyHyKw@mail.gmail.com
Backpatch-through: 17

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/514688656b8bca623bd2d1a28a549f8a56751612

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



view thread (3+ messages)  latest in thread

Message-ID: <E1urmeq-0029CL-1L@gemulon.postgresql.org>
Permalink:  ../E1urmeq-0029CL-1L@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1urmeq-0029CL-1L@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: msawada@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Use LW_SHARED in walsummarizer.c for WALSummarizerLock lock wher
  In-Reply-To: <E1urmeq-0029CL-1L@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