On Tue, Jul 8, 2025 at 11:04 PM Noah Misch <n...@leadboat.com> wrote: > > -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
I added a pair of elog(WARNING) traces before each of the new INJECTION_POINT() calls. When I run the test against the FreeBSD CI target with this new instrumentation, I see a WARNING that indicates that we've reached the top of _bt_lock_and_validate_left as expected. I don't see any second WARNING indicating that we've taken _bt_lock_and_validate_left's unhappy path, though (and the test still fails). This doesn't look like an issue with the planner. I attach the relevant regression test output, that shows all this. Thanks -- Peter Geoghegan
diff -U3 /tmp/cirrus-ci-build/src/test/modules/nbtree/expected/backwards.out /tmp/cirrus-ci-build/build/testrun/nbtree/isolation/results/backwards.out --- /tmp/cirrus-ci-build/src/test/modules/nbtree/expected/backwards.out 2025-07-09 03:22:42.701999000 +0000 +++ /tmp/cirrus-ci-build/build/testrun/nbtree/isolation/results/backwards.out 2025-07-09 03:26:13.802340000 +0000 @@ -1,24 +1,8 @@ Parsed test spec with 2 sessions starting permutation: b_scan i_insert i_detach -step b_scan: SELECT * FROM backwards_scan_tbl WHERE col % 100 = 1 ORDER BY col DESC; <waiting ...> -step i_insert: INSERT INTO backwards_scan_tbl SELECT i FROM generate_series(-2000, 700) i; -step i_detach: - SELECT injection_points_detach('lock-and-validate-left'); - SELECT injection_points_wakeup('lock-and-validate-left'); - -injection_points_detach ------------------------ - -(1 row) - -injection_points_wakeup ------------------------ - -(1 row) - -backwards_scan_session: NOTICE: notice triggered for injection point lock-and-validate-new-lastcurrblkno -step b_scan: <... completed> +backwards_scan_session: WARNING: INJECTION_POINT lock-and-validate-left +step b_scan: SELECT * FROM backwards_scan_tbl WHERE col % 100 = 1 ORDER BY col DESC; col --- 601 @@ -30,3 +14,14 @@ 1 (7 rows) +step i_insert: INSERT INTO backwards_scan_tbl SELECT i FROM generate_series(-2000, 700) i; +step i_detach: + SELECT injection_points_detach('lock-and-validate-left'); + SELECT injection_points_wakeup('lock-and-validate-left'); + +injection_points_detach +----------------------- + +(1 row) + +ERROR: could not find injection point lock-and-validate-left to wake up