Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5105c90

Browse files
committed
Make GIN tests using injection points concurrent-safe
f587338 has introduced in the test module injection_points a SQLfunction called injection_points_set_local(), that can be used to makeall the injection points linked to the process where they are attached,discarded automatically if any remain once the process exits.e2e3b8a has added a NO_INSTALLCHECK to the test module to preventthe use of installcheck. Now that there is a way to make the testconcurrent-safe, let's use it and remove the installcheck restriction.Concurrency issues could be easily reproduced by running in a tightloop a command like this one, in src/test/modules/gin/ (hardcodingpg_sleep() after attaching injection points enlarges the race window)and a second test suite like contrib/btree_gin/: make installcheck USE_MODULE_DB=1Reviewed-by: Andrey BorodinDiscussion:https://postgr.es/m/ZhNG4Io9uYOgwv3F@paquier.xyz
1 parent7e85d1c commit5105c90

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

‎src/test/modules/gin/Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ EXTRA_INSTALL = src/test/modules/injection_points
44

55
REGRESS = gin_incomplete_splits
66

7-
# The injection points are cluster-wide, so disable installcheck
8-
NO_INSTALLCHECK = 1
9-
107
ifdefUSE_PGXS
118
PG_CONFIG = pg_config
129
PGXS :=$(shell$(PG_CONFIG) --pgxs)

‎src/test/modules/gin/expected/gin_incomplete_splits.out

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
-- This uses injection points to cause errors that leave some page
1313
-- splits in "incomplete" state
1414
create extension injection_points;
15+
-- Make all injection points local to this process, for concurrency.
16+
SELECT injection_points_set_local();
17+
injection_points_set_local
18+
----------------------------
19+
20+
(1 row)
21+
1522
-- Use the index for all the queries
1623
set enable_seqscan=off;
1724
-- Print a NOTICE whenever an incomplete split gets fixed

‎src/test/modules/gin/meson.build

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,5 @@ tests += {
1212
'sql': [
1313
'gin_incomplete_splits',
1414
],
15-
# The injection points are cluster-wide, so disable installcheck
16-
'runningcheck':false,
1715
},
1816
}

‎src/test/modules/gin/sql/gin_incomplete_splits.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
-- splits in "incomplete" state
1515
create extension injection_points;
1616

17+
-- Make all injection points local to this process, for concurrency.
18+
SELECT injection_points_set_local();
19+
1720
-- Use the index for all the queries
1821
set enable_seqscan=off;
1922

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp