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-Wzn=yZ8Oou=0fiAVacD-jt1LW2_7MPve1+J51OZWaEMg=A@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 Wed, Jul 9, 2025 at 10:24 PM Noah Misch <noah@leadboat.com> wrote:
> Looking at .cirrus.tasks.yml, I bet the key factor is that CI task using
> debug_parallel_query=regress.  I bet the leader is attached to the injection
> point, but the WARNING is reached in a parallel worker.

Yep, that was it.

> If that matches what you see, I'd use a PARALLEL RESTRICTED or PARALLEL UNSAFE
> function in your query to ensure the code in question runs in the leader.

That seems like the way to go.

At some point I'll start a new thread with a formal patch proposal,
that'll include the tests on this thread. I also plan on using
injection points to write a simple/serial regression test exercising
the nbtree code that completes an incomplete split (following a hard
crash/error).

Thanks again
--
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: [PING] fallocate() causes btrfs to never compress postgresql files
Next
From: "David E. Wheeler"
Date:
Subject: Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part