Re: Can can I make an injection point wait occur no more than once? - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Can can I make an injection point wait occur no more than once?
Date
Msg-id CAH2-WzmccKur-zmoPS3X66vCHTFD_knuSZPhpKSgd9=5aRzSqw@mail.gmail.com
Whole thread Raw
In response to Re: Can can I make an injection point wait occur no more than once?  (Noah Misch <noah@leadboat.com>)
List pgsql-hackers
On Mon, Jul 7, 2025 at 6:02 PM Noah Misch <noah@leadboat.com> wrote:
> In your test, just detach the injection point while the backend under test is
> waiting at the injection point.  All of
> src/test/modules/injection_points/specs/*.spec use that technique.

That appears to work (without the kludge I added to nbtsearch.c),
though I find that I need to detach the injection point *and* wake up
the waiting backend. In that order. Thanks!

For what it's worth, I found
src/test/modules/injection_points/specs/basic.spec (which is supposed
to serve as a template) hard to follow. The comments don't seem to
explain what the detach and wait functions actually do, and how and
why one might want to call them together.

--
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: Can can I make an injection point wait occur no more than once?
Next
From: Tomas Vondra
Date:
Subject: Re: Adding basic NUMA awareness - Preliminary feedback and outline for an extensible approach