]> 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:47 +0000 (17:06 -0700)
committerMasahiko Sawada <msawada@postgresql.org>
Fri, 29 Aug 2025 00:06:47 +0000 (17:06 -0700)
commit00064302cbf2736d8eaf27ac068328981c6b0212
tree64ed7ad7786c96e5125630180aa1c5ccf069d5d5
parent456c6a05d9900816c94f28b750eda3f13a1049fb
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