postgres.git / summary / log / commit / refs
commit 92a74e26bbed36055e7776b354ea3d3118aafd75
Author: Masahiko Sawada <msawada@postgresql.org>
Date: Fri Nov 06 00:49:55 2026 +0000
First released in: 19.0
Detach injection point at the end of repack_dropped isolation test.
Commit e5d25959cf8 added the repack_dropped isolation test, which
attaches the injection point repack-concurrently-before-lock as a
local one but doesn't detach it. The injection point is then detached
only when the session's backend exits, and isolationtester doesn't
wait for that before starting the next test. If the backend is slow to
exit, the next test that attaches the same injection point, currently
repack_missingval, fails with an "already defined" error.
Fix by detaching it in the session's teardown, as the other REPACK
tests do. Since the session that attached the injection point detaches
it, the exiting backend no longer touches it.
Reported-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Author: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Discussion: https://postgr.es/m/8ccd0497-c914-47e2-804d-299b678863bf@gmail.com
Backpatch-through: 19
src/test/modules/injection_points/expected/repack_dropped.out | 5 +++++
src/test/modules/injection_points/specs/repack_dropped.spec | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/src/test/modules/injection_points/expected/repack_dropped.out b/src/test/modules/injection_points/expected/repack_dropped.out
index 4186ce4981c..44ba55d94a6 100644
--- a/src/test/modules/injection_points/expected/repack_dropped.out
+++ b/src/test/modules/injection_points/expected/repack_dropped.out
@@ -49,3 +49,8 @@ id|fits_in_one_block
3|t
(3 rows)
+injection_points_detach
+-----------------------
+
+(1 row)
+
diff --git a/src/test/modules/injection_points/specs/repack_dropped.spec b/src/test/modules/injection_points/specs/repack_dropped.spec
index 8dabd4fafb4..ec888f86bbc 100644
--- a/src/test/modules/injection_points/specs/repack_dropped.spec
+++ b/src/test/modules/injection_points/specs/repack_dropped.spec
@@ -64,6 +64,11 @@ step s2_noop
{
}
+teardown
+{
+ SELECT injection_points_detach('repack-concurrently-before-lock');
+}
+
session s3
step s3_updates
{
[parent: f1e97a292107]