]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Use LW_SHARED in walsummarizer.c for WALSummarizerLock lock where possible.
authorMasahiko Sawada <msawada@postgresql.org>
Fri, 29 Aug 2025 00:06:44 +0000 (17:06 -0700)
committerMasahiko Sawada <msawada@postgresql.org>
Fri, 29 Aug 2025 00:06:44 +0000 (17:06 -0700)
commit514688656b8bca623bd2d1a28a549f8a56751612
tree1470e4d3f85110653c109366ab23a23d89ccff22
parent3aee6283709f6a7d826b3fb5773cc4496788a5df
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
src/backend/postmaster/walsummarizer.c