From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
---|---|
To: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Use LW_SHARED in WakeupWalSummarizer() for WALSummarizerLock lock |
Date: | 2025-08-26 00:48:49 |
Message-ID: | CAD21AoBi6_YVdjMupppOuhRq_SBPFYJuiJER+CCcisZWA_ZZcg@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Aug 25, 2025 at 5:08 PM Nathan Bossart <nathandbossart(at)gmail(dot)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.
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Use-LW_SHARED-in-walsummarizer.c-for-WALSummarize.patch | application/octet-stream | 1.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2025-08-26 00:53:57 | Re: END is not a reserved word |
Previous Message | Andres Freund | 2025-08-26 00:44:58 | Re: Non-reproducible AIO failure |