From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Peter Geoghegan <pg(at)bowt(dot)ie> |
Cc: | Noah Misch <noah(at)leadboat(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Can can I make an injection point wait occur no more than once? |
Date: | 2025-07-07 23:42:54 |
Message-ID: | aGxbfkcGdfFKATBz@paquier.xyz |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jul 07, 2025 at 06:31:33PM -0400, Peter Geoghegan wrote:
> On Mon, Jul 7, 2025 at 6:02 PM Noah Misch <noah(at)leadboat(dot)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!
That's a property that Noah was looking after when he's worked on his
specs with the VACUUM/GRANT frictions, something that one would get
with a debugger: keep waiting and allow the point to be detached in
parallel.
> 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.
If you see ways to improve the existing template, please feel free to
propose something, sure.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2025-07-07 23:52:08 | Re: [PATCH] Add support for displaying database service in psql prompt |
Previous Message | Hannu Krosing | 2025-07-07 23:39:59 | Re: What is a typical precision of gettimeofday()? |