Re: LockHasWaiters() crashes on fast-path locks

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, SATYANARAYANA NARLAPURAM <satyanarlapuram(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: LockHasWaiters() crashes on fast-path locks
Date: 2026-09-02 22:54:36
Message-ID: CALj2ACVYPcbFxdoUNGcy=jX3oK=RpGHUW2RjNiaYHY21rG2uNg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Tue, Sep 1, 2026 at 9:55 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Wed, Sep 02, 2026 at 08:53:47AM +0900, Michael Paquier wrote:
> > Perhaps out-of-core code or extensions could make use of this API, but
> > in my experience this usually points at possible optimizations in the
> > backend core code. I'd suggest to look at that first, perhaps, if
> > you'd like to make LockHasWaiters() fast-path safe?
>
> Oh, I have missed the argument about autoprewarm and pg_prewarm on
> this thread:
> https://www.postgresql.org/message-id/CALj2ACXXx9TwYzeP0cRnZKHz60yOYivcG7yiV=2FTC5chSVoOg@mail.gmail.com
>
> Sorry about that.

Thanks for taking a look at it.

> I'd be curious about a different case where this
> could be used.
> Without the other proposal this feels a bit dead when
> taken independently..

I haven't looked into other cases where this could be used independently.

For now, I will move this to the other thread as a 0001 patch and
close this thread's CF entry.

--
Bharath Rupireddy
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2026-09-02 23:05:49 Re: PGQ catalog representation and pg_dump support
Previous Message David Rowley 2026-09-02 22:48:44 Re: glist: _Generic wrapper for selective dlist/dclist usage