Re: heavily contended lwlocks with long wait queues scale badly - Mailing list pgsql-hackers

From Zhihong Yu
Subject Re: heavily contended lwlocks with long wait queues scale badly
Date
Msg-id CALNJ-vQYE8USe+MsrmOTUsP-k=y=nqWDABObzA4B515t-htswQ@mail.gmail.com
Whole thread Raw
In response to Re: heavily contended lwlocks with long wait queues scale badly  (Andres Freund <andres@anarazel.de>)
Responses Re: heavily contended lwlocks with long wait queues scale badly
List pgsql-hackers


On Mon, Oct 31, 2022 at 4:51 PM Andres Freund <andres@anarazel.de> wrote:
Hi,

On 2022-10-31 16:21:06 +0530, Bharath Rupireddy wrote:
> BTW, I've seen a sporadic crash (SEGV) with the patch in bg writer
> with the same set up [1], I'm not sure if it's really because of the
> patch. I'm unable to reproduce it now and unfortunately I didn't
> capture further details when it occurred.

That's likely because the prototype patch I submitted in this thread missed
updating LWLockUpdateVar().

Updated patch attached.

Greetings,

Andres Freund

Hi,
Minor comment:

+   uint8       lwWaiting;      /* see LWLockWaitState */

Why not declare `lwWaiting` of type LWLockWaitState ?

Cheers 

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: resowner "cold start" overhead
Next
From: Tom Lane
Date:
Subject: Re: Making Vars outer-join aware