Re: the s_lock_stuck on perform_spin_delay - Mailing list pgsql-hackers

From Robert Haas
Subject Re: the s_lock_stuck on perform_spin_delay
Date
Msg-id CA+TgmoZeNF8AaiQncuacdo3kAMz-pdSrVe1Ev-CcW=Ld7fYM0Q@mail.gmail.com
Whole thread Raw
In response to Re: the s_lock_stuck on perform_spin_delay  (Matthias van de Meent <boekewurm+postgres@gmail.com>)
Responses Re: the s_lock_stuck on perform_spin_delay
List pgsql-hackers
Thanks for jumping in with a review, Matthias!

On Wed, Jan 10, 2024 at 8:03 AM Matthias van de Meent
<boekewurm+postgres@gmail.com> wrote:
> I'm not 100% sure on the policy of this, but theoretically you could
> use LockAquireExtended(dontWait=true) while holding a spin lock, as
> that would not have an unknown duration. Then again, this function
> also does elog/ereport, which would cause issues, still, so this code
> may be the better option.

This is definitely not allowable, and anybody who is thinking about
doing it should replace the spinlock with an LWLock.

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Andrei Lepikhov
Date:
Subject: Re: Custom explain options
Next
From: Robert Haas
Date:
Subject: Re: Relation bulk write facility