Re: Use LW_SHARED in WakeupWalSummarizer() for WALSummarizerLock lock
Masahiko Sawada <sawada.mshk@gmail.com>
From: Masahiko Sawada <sawada.mshk@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-08-29T18:47:44Z
Lists: pgsql-hackers
On Mon, Aug 25, 2025 at 5:48 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > > On Mon, Aug 25, 2025 at 5:08 PM Nathan Bossart <nathandbossart@gmail.com> wrote: > > > > On Mon, Aug 25, 2025 at 03:38:13PM -0700, Masahiko Sawada wrote: > > > While reading walsummarizer.c code, I noticed that in > > > WakeupWalSummarizer() we acquire the WALSummarizerLock lock in > > > LW_EXCLUSIVE mode despite only reading > > > WalSummarizerCtl->summarizer_pgprocno. The attached patch uses > > > LW_SHARED mode instead. Feedback is very welcome. > > > > You could probably do something similar for WaitForWalSummarization(). > > Good point. I've attached the updated patch. Pushed. Regards, -- Masahiko Sawada Amazon Web Services: https://aws.amazon.com
Commits
-
Use LW_SHARED in walsummarizer.c for WALSummarizerLock lock where possible.
- 00064302cbf2 17.7 landed
- 514688656b8b 18.0 landed
- fabd8b8e2a72 19 (unreleased) landed