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

Commit720629c

Browse files
committed
new isolation test for 'FOR UPDATE' feature, rename 'insert_trigger.spec'
1 parent69da310 commit720629c

File tree

6 files changed

+73
-2
lines changed

6 files changed

+73
-2
lines changed

‎.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.deps
2+
isolation_output
23
results/pg_pathman.out
34
regression.diffs
45
regression.out

‎Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ endif
2727
$(EXTENSION)--$(EXTVERSION).sql: init.sql hash.sql range.sql
2828
cat$^>$@
2929

30-
ISOLATIONCHECKS=insert_trigger
30+
ISOLATIONCHECKS=insert_nodes for_update
3131

3232
submake-isolation:
3333
$(MAKE) -C$(top_builddir)/src/test/isolation all

‎expected/for_update.out

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Parsed test spec with 2 sessions
2+
3+
starting permutation: s1_b s1_update s2_select s1_r
4+
create_range_partitions
5+
6+
10
7+
step s1_b: begin;
8+
step s1_update: update test_tbl set id = 2 where id = 1;
9+
step s2_select: select * from test_tbl where id = 1;
10+
id val
11+
12+
1 1
13+
step s1_r: rollback;
14+
15+
starting permutation: s1_b s1_update s2_select_locked s1_r
16+
create_range_partitions
17+
18+
10
19+
step s1_b: begin;
20+
step s1_update: update test_tbl set id = 2 where id = 1;
21+
step s2_select_locked: select * from test_tbl where id = 1 for share; <waiting ...>
22+
step s1_r: rollback;
23+
step s2_select_locked: <... completed>
24+
id val
25+
26+
1 1
27+
28+
starting permutation: s1_b s1_update s2_select_locked s1_c
29+
create_range_partitions
30+
31+
10
32+
step s1_b: begin;
33+
step s1_update: update test_tbl set id = 2 where id = 1;
34+
step s2_select_locked: select * from test_tbl where id = 1 for share; <waiting ...>
35+
step s1_c: commit;
36+
step s2_select_locked: <... completed>
37+
id val
38+
File renamed without changes.

‎specs/for_update.spec

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
setup
2+
{
3+
createextensionpg_pathman;
4+
createtabletest_tbl(idintnotnull,valreal);
5+
insertintotest_tblselecti,ifromgenerate_series(1,1000)asi;
6+
selectcreate_range_partitions('test_tbl','id',1,100,10);
7+
}
8+
9+
teardown
10+
{
11+
droptabletest_tblcascade;
12+
dropextensionpg_pathman;
13+
}
14+
15+
session"s1"
16+
step"s1_b" {begin; }
17+
step"s1_c" {commit; }
18+
step"s1_r" {rollback; }
19+
step"s1_update" {updatetest_tblsetid=2whereid=1; }
20+
21+
session"s2"
22+
step"s2_b" {begin; }
23+
step"s2_c" {commit; }
24+
step"s2_select_locked" {select*fromtest_tblwhereid=1forshare; }
25+
step"s2_select" {select*fromtest_tblwhereid=1; }
26+
27+
28+
permutation"s1_b""s1_update""s2_select""s1_r"
29+
30+
permutation"s1_b""s1_update""s2_select_locked""s1_r"
31+
32+
permutation"s1_b""s1_update""s2_select_locked""s1_c"

‎specs/insert_trigger.specrenamed to‎specs/insert_nodes.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ setup
77

88
teardown
99
{
10-
SELECTdrop_range_partitions('range_rel');
10+
SELECTdrop_partitions('range_rel');
1111
DROPTABLErange_relCASCADE;
1212
DROPEXTENSIONpg_pathman;
1313
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp