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

From Noah Misch
Subject Re: Can can I make an injection point wait occur no more than once?
Date
Msg-id 20250709030455.a7@rfd.leadboat.com
Whole thread Raw
In response to Can can I make an injection point wait occur no more than once?  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: Can can I make an injection point wait occur no more than once?
List pgsql-hackers
On Tue, Jul 08, 2025 at 11:21:20AM -0400, Peter Geoghegan wrote:
> On Mon, Jul 7, 2025 at 9:53 PM Noah Misch <noah@leadboat.com> wrote:
> > If it continues to be a problem, consider sharing the patch that's behaving
> > this way for you.
> 
> Attached patch shows my current progress with the isolation test.

Nothing looks suspicious in that code.

> I also attach diff output of the FreeBSD failures. Notice that the
> line "backwards_scan_session: NOTICE:  notice triggered for injection
> point lock-and-validate-new-lastcurrblkno" is completely absent from
> the test output. This absence indicates that the desired test coverage
> is totally missing on FreeBSD -- so the test is completely broken on
> FreeBSD.
> 
> I ran "meson test --suite setup --suite nbtree -q --print-errorlogs"
> in a loop 500 times on my Debian workstation without seeing any
> failures. Seems stable there. Whereas the FreeBSD target hasn't even
> passed once out of more than a dozen attempts. Seems to be reliably
> broken on FreeBSD.

> -backwards_scan_session: NOTICE:  notice triggered for injection point lock-and-validate-new-lastcurrblkno
> +ERROR:  could not find injection point lock-and-validate-left to wake up

Agreed.  Perhaps it's getting a different plan type on FreeBSD, so it's not
even reaching the INJECTION_POINT() calls?  That would be consistent with
these output diffs having no ERROR from attach/detach.  Some things I'd try:

- Add a plain elog(WARNING) before each INJECTION_POINT()
- Use debug_print_plan or similar to confirm the plan type



pgsql-hackers by date:

Previous
From: shveta malik
Date:
Subject: Re: Using failover slots for PG-non_PG logical replication
Next
From: Dilip Kumar
Date:
Subject: Re: A recent message added to pg_upgade