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

Commit31a877f

Browse files
committed
Allow drop-index-concurrently-1 test to run at any isolation level.
It previously reported failure at REPEATABLE READ and SERIALIZABLEtransaction isolation levels for make installcheck.
1 parent6648775 commit31a877f

File tree

3 files changed

+52
-3
lines changed

3 files changed

+52
-3
lines changed

‎src/test/isolation/expected/drop-index-concurrently-1.out

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
Parsed test spec with 3 sessions
22

3-
starting permutation: noseq prepi preps begin explaini explains select2 drop insert2 end2 selecti selects end
3+
starting permutation: noseqchkisoprepi preps begin explaini explains select2 drop insert2 end2 selecti selects end
44
step noseq: SET enable_seqscan = false;
5+
step chkiso: SELECT (setting in ('read committed','read uncommitted')) AS is_read_committed FROM pg_settings WHERE name = 'default_transaction_isolation';
6+
is_read_committed
7+
8+
t
59
step prepi: PREPARE getrow_idx AS SELECT * FROM test_dc WHERE data=34 ORDER BY id,data;
610
step preps: PREPARE getrow_seq AS SELECT * FROM test_dc WHERE data::text=34::text ORDER BY id,data;
711
step begin: BEGIN;
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
Parsed test spec with 3 sessions
2+
3+
starting permutation: noseq chkiso prepi preps begin explaini explains select2 drop insert2 end2 selecti selects end
4+
step noseq: SET enable_seqscan = false;
5+
step chkiso: SELECT (setting in ('read committed','read uncommitted')) AS is_read_committed FROM pg_settings WHERE name = 'default_transaction_isolation';
6+
is_read_committed
7+
8+
f
9+
step prepi: PREPARE getrow_idx AS SELECT * FROM test_dc WHERE data=34 ORDER BY id,data;
10+
step preps: PREPARE getrow_seq AS SELECT * FROM test_dc WHERE data::text=34::text ORDER BY id,data;
11+
step begin: BEGIN;
12+
step explaini: EXPLAIN (COSTS OFF) EXECUTE getrow_idx;
13+
QUERY PLAN
14+
15+
Sort
16+
Sort Key: id
17+
-> Index Scan using test_dc_data on test_dc
18+
Index Cond: (data = 34)
19+
step explains: EXPLAIN (COSTS OFF) EXECUTE getrow_seq;
20+
QUERY PLAN
21+
22+
Sort
23+
Sort Key: id, data
24+
-> Seq Scan on test_dc
25+
Filter: ((data)::text = '34'::text)
26+
step select2: SELECT * FROM test_dc WHERE data=34 ORDER BY id,data;
27+
id data
28+
29+
34 34
30+
step drop: DROP INDEX CONCURRENTLY test_dc_data; <waiting ...>
31+
step insert2: INSERT INTO test_dc(data) SELECT * FROM generate_series(1, 100);
32+
step end2: COMMIT;
33+
step selecti: EXECUTE getrow_idx;
34+
id data
35+
36+
34 34
37+
step selects: EXECUTE getrow_seq;
38+
id data
39+
40+
34 34
41+
step end: COMMIT;
42+
step drop: <... completed>

‎src/test/isolation/specs/drop-index-concurrently-1.spec

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# DROP INDEX CONCURRENTLY
22
#
33
# This test shows that the concurrent write behaviour works correctly
4-
# with the expected output being 2 rows.
4+
# with the expected output being 2 rows at the READ COMMITTED and READ
5+
# UNCOMMITTED transaction isolation levels, and 1 row at the other
6+
# transaction isolation levels.
57
#
68
setup
79
{
@@ -17,6 +19,7 @@ teardown
1719

1820
session"s1"
1921
step"noseq" {SETenable_seqscan=false; }
22+
step"chkiso" {SELECT (settingin ('read committed','read uncommitted'))ASis_read_committedFROMpg_settingsWHEREname='default_transaction_isolation'; }
2023
step"prepi" {PREPAREgetrow_idxASSELECT*FROMtest_dcWHEREdata=34ORDERBYid,data; }
2124
step"preps" {PREPAREgetrow_seqASSELECT*FROMtest_dcWHEREdata::text=34::textORDERBYid,data; }
2225
step"begin" {BEGIN; }
@@ -35,4 +38,4 @@ step "end2" { COMMIT; }
3538
session"s3"
3639
step"drop" {DROPINDEXCONCURRENTLYtest_dc_data; }
3740

38-
permutation"noseq""prepi""preps""begin""explaini""explains""select2""drop""insert2""end2""selecti""selects""end"
41+
permutation"noseq""chkiso""prepi""preps""begin""explaini""explains""select2""drop""insert2""end2""selecti""selects""end"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp