pgsql: Use LW_SHARED in walsummarizer.c for WALSummarizerLock lock wher

From: Masahiko Sawada <msawada(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use LW_SHARED in walsummarizer.c for WALSummarizerLock lock wher
Date: 2025-08-29 00:08:00
Message-ID: E1urmeu-0029Cu-1B@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAD21AoDdKhf_9oriEYxY-JCdF+Oe_muhca3pcdkMEdBMzyHyKw@mail.gmail.com
Backpatch-through: 17

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/00064302cbf2736d8eaf27ac068328981c6b0212

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

Browse pgsql-committers by date

  From Date Subject
Next Message Richard Guo 2025-08-29 04:14:40 pgsql: Fix semijoin unique-ification for child relations
Previous Message Masahiko Sawada 2025-08-29 00:07:57 pgsql: Use LW_SHARED in walsummarizer.c for WALSummarizerLock lock wher