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

From Michael Paquier
Subject Re: injection_points: Switch wait/wakeup to use atomics rather than latches
Date
Msg-id ah9X1M0r-dLPgNa6@paquier.xyz
Whole thread
In response to Re: injection_points: Switch wait/wakeup to use atomics rather than latches  (Andrey Borodin <x4mmm@yandex-team.ru>)
Responses Re: injection_points: Switch wait/wakeup to use atomics rather than latches
List pgsql-hackers
On Tue, Jun 02, 2026 at 11:46:52PM +0500, Andrey Borodin wrote:
> For tests without PGPROC we can mmap() inj_state to a fixed file in
> PGDATA/injection_points.shm. TAP can poll name[] to detect that a wait
> point was reached and bump wait_counts[] to wake.

That's a direction.  Only mmap() would not be sufficient, as WIN32 has
its own non-POSIX idea on the matter with CreateFileMapping() &
friends.  I am wondering if we should think harder about an interface
that could make such things easier for extensions.  Or we could have a
portable layer added to injection_points, as well..
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Henson Choi
Date:
Subject: Re: Row pattern recognition
Next
From: Andrey Chernyy
Date:
Subject: Re: [PATCH] Fix libxml leaks in contrib/xml2 XPath functions