Re: injection_points: Switch wait/wakeup to use atomics rather than latches - Mailing list pgsql-hackers

From Robert Haas
Subject Re: injection_points: Switch wait/wakeup to use atomics rather than latches
Date
Msg-id CA+TgmoYE-9WhM-owWtX3grbSeHtOJCF__wEEdoD-jj-oJ+=TSg@mail.gmail.com
Whole thread
In response to Re: injection_points: Switch wait/wakeup to use atomics rather than latches  (Michael Paquier <michael@paquier.xyz>)
Responses Re: injection_points: Switch wait/wakeup to use atomics rather than latches
List pgsql-hackers
On Thu, May 28, 2026 at 7:19 PM Michael Paquier <michael@paquier.xyz> wrote:
> On Thu, May 28, 2026 at 08:40:39AM -0400, Robert Haas wrote:
> > After reading this email, the linked-to email, and the commit message
> > for the patch, I still don't have a clear understanding of what this
> > is intended to fix. It seems like it's going to make the
> > responsiveness worse. In general, we want to replace escalating wait
> > loops with things that wake up instantly at the right time, and this
> > is going in the opposite direction.
>
> This is an exchange between responsiveness of the system and
> flexibility.  I have had two complaints in the past about the fact
> that the waits and wakeups were not doable due to the fact that we
> rely on condition variables and latches:

I'm still struggling to understand. Condition variables and latches
are both designed to allow for nice waits and wakeups.

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



pgsql-hackers by date:

Previous
From: Jakob Egger
Date:
Subject: glob support in extension_control_path/dynamic_library_path?
Next
From: Laurenz Albe
Date:
Subject: Re: Key joins