=== Applying patches on top of PostgreSQL commit ID e395fbd32a07557de4ac98088928c1749d4845d8 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Sun Jul 26 09:39:29 UTC 2026 On branch cf/7037 nothing to commit, working tree clean === using 'git am' to apply patch ./0001-injection_points-clear-waiter-slot-on-error-and-exit.patch === Applying: injection_points: clear waiter slot on error and exit Using index info to reconstruct a base tree... M src/test/modules/injection_points/Makefile M src/test/modules/injection_points/injection_points.c M src/test/modules/injection_points/meson.build Falling back to patching base and 3-way merge... CONFLICT (add/add): Merge conflict in src/test/modules/injection_points/specs/wait_cleanup.spec Auto-merging src/test/modules/injection_points/specs/wait_cleanup.spec Auto-merging src/test/modules/injection_points/meson.build Auto-merging src/test/modules/injection_points/injection_points.c CONFLICT (content): Merge conflict in src/test/modules/injection_points/injection_points.c Auto-merging src/test/modules/injection_points/Makefile error: Failed to merge in the changes. hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 injection_points: clear waiter slot on error and exit When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". === using patch(1) to apply patch ./0001-injection_points-clear-waiter-slot-on-error-and-exit.patch === patching file src/test/modules/injection_points/Makefile The next patch would create the file src/test/modules/injection_points/expected/wait_cleanup.out, which already exists! Skipping patch. 1 out of 1 hunk ignored patching file src/test/modules/injection_points/injection_points.c Hunk #1 succeeded at 236 with fuzz 1 (offset 13 lines). Hunk #2 FAILED at 294. 1 out of 2 hunks FAILED -- saving rejects to file src/test/modules/injection_points/injection_points.c.rej patching file src/test/modules/injection_points/meson.build The next patch would create the file src/test/modules/injection_points/specs/wait_cleanup.spec, which already exists! Skipping patch. 1 out of 1 hunk ignored Unstaged changes after reset: M src/test/modules/injection_points/Makefile M src/test/modules/injection_points/injection_points.c M src/test/modules/injection_points/meson.build Removing src/test/modules/injection_points/injection_points.c.rej === using 'git apply' to apply patch ./0001-injection_points-clear-waiter-slot-on-error-and-exit.patch === Applied patch to 'src/test/modules/injection_points/Makefile' cleanly. Performing three-way merge... Applied patch to 'src/test/modules/injection_points/expected/wait_cleanup.out' cleanly. Applied patch to 'src/test/modules/injection_points/injection_points.c' with conflicts. Applied patch to 'src/test/modules/injection_points/meson.build' cleanly. Performing three-way merge... Applied patch to 'src/test/modules/injection_points/specs/wait_cleanup.spec' with conflicts. U src/test/modules/injection_points/injection_points.c U src/test/modules/injection_points/specs/wait_cleanup.spec diff --cc src/test/modules/injection_points/injection_points.c index 0ed1dc7c8a7,a549720ed75..00000000000 --- a/src/test/modules/injection_points/injection_points.c +++ b/src/test/modules/injection_points/injection_points.c @@@ -224,7 -224,13 +224,17 @@@ injection_notice(const char *name, cons } /* ++<<<<<<< ours + * Error cleanup callback for injection point waits. ++======= + * Clear the shared waiter slot of this backend, on error or process exit. + * + * Without this a canceled or terminated waiter would leak its slot, and + * later wakeups of the same injection point would bump the leaked slot's + * counter instead of the real waiter's. Registered through + * PG_ENSURE_ERROR_CLEANUP so that it also runs on FATAL, which exits + * without unwinding the stack. ++>>>>>>> theirs */ static void injection_wait_cleanup(int code, Datum arg) diff --cc src/test/modules/injection_points/specs/wait_cleanup.spec index ed7d21c4de4,4ef8c293e83..00000000000 --- a/src/test/modules/injection_points/specs/wait_cleanup.spec +++ b/src/test/modules/injection_points/specs/wait_cleanup.spec @@@ -12,24 -12,24 +12,41 @@@ teardow DROP EXTENSION injection_points; } ++<<<<<<< ours +# The first waiter, that gets canceled or terminated. This does not +# use injection_points_set_local() on purpose: the injection point +# must survive s1's termination so that s3 can still detach it. ++======= + # The first waiter, which gets canceled or terminated. No set_local: + # the injection point must survive s1's termination so that s3 can + # still detach it. ++>>>>>>> theirs session s1 setup { SELECT injection_points_attach('injection-points-wait', 'wait'); } step wait1 { SELECT injection_points_run('injection-points-wait'); } ++<<<<<<< ours +# The second waiter, that receives a wakeup. ++======= + # The second waiter, which must still receive the wakeup. ++>>>>>>> theirs session s2 step wait2 { SELECT injection_points_run('injection-points-wait'); } step noop2 { } ++<<<<<<< ours +# Control session. The blocker annotations on cancel3/terminate3, +# together with noop3, make the tester wait until wait1 has fully +# completed before starting wait2. Otherwise, wait2 could register a +# new waiter slot while s1 still owns the previous one. ++======= + # The control session. The blocker annotations on cancel3/terminate3 + # plus noop3 make the tester wait until wait1 actually finished before + # starting wait2, otherwise wait2 could register its own waiter slot + # while s1 still holds the old one. ++>>>>>>> theirs session s3 step cancel3 { SELECT pg_cancel_backend(pid) FROM pg_stat_activity