Re: injection_points: Switch wait/wakeup to use atomics rather than latches

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Subject: Re: injection_points: Switch wait/wakeup to use atomics rather than latches
Date: 2026-06-02 22:23:16
Message-ID: ah9X1M0r-dLPgNa6@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Chernyy 2026-06-02 22:29:27 Re: [PATCH] Fix libxml leaks in contrib/xml2 XPath functions
Previous Message Henson Choi 2026-06-02 22:14:21 Re: Row pattern recognition