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

Commita899f36

Browse files
author
Marina Polyakova
committed
Merge remote-tracking branch 'origin/PGPRO-9334' into PGPRO-9251-9334
Conflicts:MakefileCaused by:-47b75b0 [PGPRO-9334] Enable isolation tests-51edb67 [PGPRO-9251] Added new parameter PG_TEST_SKIP
2 parents51edb67 +1857bde commita899f36

9 files changed

+514
-302
lines changed

‎.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.deps
2-
isolation_output
32
results/*
43
regression.diffs
54
regression.out

‎Makefile

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,13 @@ REGRESS = pathman_array_qual \
6666
pathman_CVE-2020-14350
6767
endif
6868

69-
EXTRA_REGRESS_OPTS=--temp-config=$(top_srcdir)/$(subdir)/conf.add
69+
ISOLATION = insert_nodes for_update rollback_on_create_partitions
70+
71+
REGRESS_OPTS = --temp-config$(top_srcdir)/$(subdir)/conf.add
72+
ISOLATION_OPTS = --temp-config$(top_srcdir)/$(subdir)/conf.add
7073

7174
CMOCKA_EXTRA_CLEAN = missing_basic.o missing_list.o missing_stringinfo.o missing_bitmapset.o rangeset_tests.o rangeset_tests
72-
EXTRA_CLEAN =./isolation_output$(patsubst%,tests/cmocka/%,$(CMOCKA_EXTRA_CLEAN))
75+
EXTRA_CLEAN =$(patsubst%,tests/cmocka/%,$(CMOCKA_EXTRA_CLEAN))
7376

7477
ifdefUSE_PGXS
7578
PG_CONFIG=pg_config
@@ -84,6 +87,14 @@ OBJS += src/declarative.o
8487
overridePG_CPPFLAGS += -DENABLE_DECLARATIVE
8588
endif
8689

90+
# We cannot run isolation test for versions 12,13 in PGXS case
91+
# because 'pg_isolation_regress' is not copied to install
92+
# directory, see src/test/isolation/Makefile
93+
ifeq ($(VNUM),$(filter 12% 13%,$(VNUM)))
94+
undefineISOLATION
95+
undefineISOLATION_OPTS
96+
endif
97+
8798
include$(PGXS)
8899
else
89100
subdir = contrib/pg_pathman
@@ -95,18 +106,6 @@ endif
95106
$(EXTENSION)--$(EXTVERSION).sql: init.sql hash.sql range.sql
96107
cat$^>$@
97108

98-
ISOLATIONCHECKS=insert_nodes for_update rollback_on_create_partitions
99-
100-
submake-isolation:
101-
$(MAKE) -C$(top_builddir)/src/test/isolation all
102-
103-
isolationcheck: | submake-isolation
104-
$(MKDIR_P) isolation_output
105-
$(pg_isolation_regress_check)\
106-
--temp-config=$(top_srcdir)/$(subdir)/conf.add\
107-
--outputdir=./isolation_output\
108-
$(ISOLATIONCHECKS)
109-
110109
python_tests:
111110
$(MAKE) -C tests/python partitioning_tests CASE=$(CASE)
112111

‎docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
tests:
1+
services:
2+
tests:
23
build:.

‎expected/for_update.out

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,49 @@ Parsed test spec with 2 sessions
22

33
starting permutation: s1_b s1_update s2_select s1_r
44
create_range_partitions
5+
-----------------------
6+
10
7+
(1 row)
58

6-
10
79
step s1_b: begin;
810
step s1_update: update test_tbl set id = 2 where id = 1;
911
step s2_select: select * from test_tbl where id = 1;
10-
id val
12+
id|val
13+
--+---
14+
1| 1
15+
(1 row)
1116

12-
1 1
1317
step s1_r: rollback;
1418

1519
starting permutation: s1_b s1_update s2_select_locked s1_r
1620
create_range_partitions
21+
-----------------------
22+
10
23+
(1 row)
1724

18-
10
1925
step s1_b: begin;
2026
step s1_update: update test_tbl set id = 2 where id = 1;
2127
step s2_select_locked: select * from test_tbl where id = 1 for share; <waiting ...>
2228
step s1_r: rollback;
2329
step s2_select_locked: <... completed>
24-
id val
30+
id|val
31+
--+---
32+
1| 1
33+
(1 row)
2534

26-
1 1
2735

2836
starting permutation: s1_b s1_update s2_select_locked s1_c
2937
create_range_partitions
38+
-----------------------
39+
10
40+
(1 row)
3041

31-
10
3242
step s1_b: begin;
3343
step s1_update: update test_tbl set id = 2 where id = 1;
3444
step s2_select_locked: select * from test_tbl where id = 1 for share; <waiting ...>
3545
step s1_c: commit;
3646
step s2_select_locked: <... completed>
37-
id val
47+
id|val
48+
--+---
49+
(0 rows)
3850

‎expected/insert_nodes.out

Lines changed: 65 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -2,122 +2,126 @@ Parsed test spec with 2 sessions
22

33
starting permutation: s1b s1_insert_150 s1r s1_show_partitions s2b s2_insert_150 s2c s2_show_partitions
44
set_spawn_using_bgw
5+
-------------------
6+
7+
(1 row)
58

6-
79
step s1b: BEGIN;
810
step s1_insert_150: INSERT INTO range_rel SELECT generate_series(1, 150);
911
step s1r: ROLLBACK;
10-
step s1_show_partitions: SELECTc.consrc FROM pg_inherits i LEFT JOIN pg_constraint c
12+
step s1_show_partitions: SELECTpg_get_constraintdef(c.oid) FROM pg_inherits i LEFT JOIN pg_constraint c
1113
ON c.conrelid = i.inhrelid
12-
WHERE i.inhparent = 'range_rel'::regclass
14+
WHERE i.inhparent = 'range_rel'::regclass AND c.contype = 'c'
1315
ORDER BY c.oid;
14-
consrc
16+
pg_get_constraintdef
17+
------------------------------------
18+
CHECK (((id >= 1) AND (id < 101)))
19+
CHECK (((id >= 101) AND (id < 201)))
20+
(2 rows)
1521

16-
17-
((id >= 1) AND (id < 101))
18-
19-
((id >= 101) AND (id < 201))
2022
step s2b: BEGIN;
2123
step s2_insert_150: INSERT INTO range_rel SELECT generate_series(1, 150);
2224
step s2c: COMMIT;
23-
step s2_show_partitions: SELECTc.consrc FROM pg_inherits i LEFT JOIN pg_constraint c
25+
step s2_show_partitions: SELECTpg_get_constraintdef(c.oid) FROM pg_inherits i LEFT JOIN pg_constraint c
2426
ON c.conrelid = i.inhrelid
25-
WHERE i.inhparent = 'range_rel'::regclass
27+
WHERE i.inhparent = 'range_rel'::regclass AND c.contype = 'c'
2628
ORDER BY c.oid;
27-
consrc
29+
pg_get_constraintdef
30+
------------------------------------
31+
CHECK (((id >= 1) AND (id < 101)))
32+
CHECK (((id >= 101) AND (id < 201)))
33+
(2 rows)
2834

29-
30-
((id >= 1) AND (id < 101))
31-
32-
((id >= 101) AND (id < 201))
3335

3436
starting permutation: s1b s1_insert_150 s1r s1_show_partitions s2b s2_insert_300 s2c s2_show_partitions
3537
set_spawn_using_bgw
38+
-------------------
39+
40+
(1 row)
3641

37-
3842
step s1b: BEGIN;
3943
step s1_insert_150: INSERT INTO range_rel SELECT generate_series(1, 150);
4044
step s1r: ROLLBACK;
41-
step s1_show_partitions: SELECTc.consrc FROM pg_inherits i LEFT JOIN pg_constraint c
45+
step s1_show_partitions: SELECTpg_get_constraintdef(c.oid) FROM pg_inherits i LEFT JOIN pg_constraint c
4246
ON c.conrelid = i.inhrelid
43-
WHERE i.inhparent = 'range_rel'::regclass
47+
WHERE i.inhparent = 'range_rel'::regclass AND c.contype = 'c'
4448
ORDER BY c.oid;
45-
consrc
49+
pg_get_constraintdef
50+
------------------------------------
51+
CHECK (((id >= 1) AND (id < 101)))
52+
CHECK (((id >= 101) AND (id < 201)))
53+
(2 rows)
4654

47-
48-
((id >= 1) AND (id < 101))
49-
50-
((id >= 101) AND (id < 201))
5155
step s2b: BEGIN;
5256
step s2_insert_300: INSERT INTO range_rel SELECT generate_series(151, 300);
5357
step s2c: COMMIT;
54-
step s2_show_partitions: SELECTc.consrc FROM pg_inherits i LEFT JOIN pg_constraint c
58+
step s2_show_partitions: SELECTpg_get_constraintdef(c.oid) FROM pg_inherits i LEFT JOIN pg_constraint c
5559
ON c.conrelid = i.inhrelid
56-
WHERE i.inhparent = 'range_rel'::regclass
60+
WHERE i.inhparent = 'range_rel'::regclass AND c.contype = 'c'
5761
ORDER BY c.oid;
58-
consrc
62+
pg_get_constraintdef
63+
------------------------------------
64+
CHECK (((id >= 1) AND (id < 101)))
65+
CHECK (((id >= 101) AND (id < 201)))
66+
CHECK (((id >= 201) AND (id < 301)))
67+
(3 rows)
5968

60-
61-
((id >= 1) AND (id < 101))
62-
63-
((id >= 101) AND (id < 201))
64-
65-
((id >= 201) AND (id < 301))
6669

6770
starting permutation: s1b s1_insert_300 s1r s1_show_partitions s2b s2_insert_150 s2c s2_show_partitions
6871
set_spawn_using_bgw
72+
-------------------
73+
74+
(1 row)
6975

70-
7176
step s1b: BEGIN;
7277
step s1_insert_300: INSERT INTO range_rel SELECT generate_series(151, 300);
7378
step s1r: ROLLBACK;
74-
step s1_show_partitions: SELECTc.consrc FROM pg_inherits i LEFT JOIN pg_constraint c
79+
step s1_show_partitions: SELECTpg_get_constraintdef(c.oid) FROM pg_inherits i LEFT JOIN pg_constraint c
7580
ON c.conrelid = i.inhrelid
76-
WHERE i.inhparent = 'range_rel'::regclass
81+
WHERE i.inhparent = 'range_rel'::regclass AND c.contype = 'c'
7782
ORDER BY c.oid;
78-
consrc
83+
pg_get_constraintdef
84+
------------------------------------
85+
CHECK (((id >= 1) AND (id < 101)))
86+
CHECK (((id >= 101) AND (id < 201)))
87+
CHECK (((id >= 201) AND (id < 301)))
88+
(3 rows)
7989

80-
81-
((id >= 1) AND (id < 101))
82-
83-
((id >= 101) AND (id < 201))
84-
85-
((id >= 201) AND (id < 301))
8690
step s2b: BEGIN;
8791
step s2_insert_150: INSERT INTO range_rel SELECT generate_series(1, 150);
8892
step s2c: COMMIT;
89-
step s2_show_partitions: SELECTc.consrc FROM pg_inherits i LEFT JOIN pg_constraint c
93+
step s2_show_partitions: SELECTpg_get_constraintdef(c.oid) FROM pg_inherits i LEFT JOIN pg_constraint c
9094
ON c.conrelid = i.inhrelid
91-
WHERE i.inhparent = 'range_rel'::regclass
95+
WHERE i.inhparent = 'range_rel'::regclass AND c.contype = 'c'
9296
ORDER BY c.oid;
93-
consrc
97+
pg_get_constraintdef
98+
------------------------------------
99+
CHECK (((id >= 1) AND (id < 101)))
100+
CHECK (((id >= 101) AND (id < 201)))
101+
CHECK (((id >= 201) AND (id < 301)))
102+
(3 rows)
94103

95-
96-
((id >= 1) AND (id < 101))
97-
98-
((id >= 101) AND (id < 201))
99-
100-
((id >= 201) AND (id < 301))
101104

102105
starting permutation: s1b s1_insert_150 s2b s2_insert_300 s1r s2r s2_show_partitions
103106
set_spawn_using_bgw
107+
-------------------
108+
109+
(1 row)
104110

105-
106111
step s1b: BEGIN;
107112
step s1_insert_150: INSERT INTO range_rel SELECT generate_series(1, 150);
108113
step s2b: BEGIN;
109114
step s2_insert_300: INSERT INTO range_rel SELECT generate_series(151, 300);
110115
step s1r: ROLLBACK;
111116
step s2r: ROLLBACK;
112-
step s2_show_partitions: SELECTc.consrc FROM pg_inherits i LEFT JOIN pg_constraint c
117+
step s2_show_partitions: SELECTpg_get_constraintdef(c.oid) FROM pg_inherits i LEFT JOIN pg_constraint c
113118
ON c.conrelid = i.inhrelid
114-
WHERE i.inhparent = 'range_rel'::regclass
119+
WHERE i.inhparent = 'range_rel'::regclass AND c.contype = 'c'
115120
ORDER BY c.oid;
116-
consrc
121+
pg_get_constraintdef
122+
------------------------------------
123+
CHECK (((id >= 1) AND (id < 101)))
124+
CHECK (((id >= 101) AND (id < 201)))
125+
CHECK (((id >= 201) AND (id < 301)))
126+
(3 rows)
117127

118-
119-
((id >= 1) AND (id < 101))
120-
121-
((id >= 101) AND (id < 201))
122-
123-
((id >= 201) AND (id < 301))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp