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

Commit38c0e72

Browse files
committed
Adjust the alternative expected output file for prepared_xacts test case,
used when max_prepared_transactions=0, for the recent changes in the testcase.
1 parent1eea8e8 commit38c0e72

File tree

1 file changed

+41
-7
lines changed

1 file changed

+41
-7
lines changed

‎src/test/regress/expected/prepared_xacts_1.out

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,6 @@ SELECT gid FROM pg_prepared_xacts;
9292

9393
BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
9494
INSERT INTO pxtest1 VALUES ('fff');
95-
SELECT * FROM pxtest1;
96-
foobar
97-
--------
98-
aaa
99-
fff
100-
(2 rows)
101-
10295
-- This should fail, because the gid foo3 is already in use
10396
PREPARE TRANSACTION 'foo3';
10497
ERROR: prepared transactions are disabled
@@ -117,6 +110,47 @@ SELECT * FROM pxtest1;
117110
aaa
118111
(1 row)
119112

113+
-- Test serialization failure (SSI)
114+
BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
115+
UPDATE pxtest1 SET foobar = 'eee' WHERE foobar = 'ddd';
116+
SELECT * FROM pxtest1;
117+
foobar
118+
--------
119+
aaa
120+
(1 row)
121+
122+
PREPARE TRANSACTION 'foo4';
123+
ERROR: prepared transactions are disabled
124+
HINT: Set max_prepared_transactions to a nonzero value.
125+
SELECT gid FROM pg_prepared_xacts;
126+
gid
127+
-----
128+
(0 rows)
129+
130+
BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
131+
SELECT * FROM pxtest1;
132+
foobar
133+
--------
134+
aaa
135+
(1 row)
136+
137+
INSERT INTO pxtest1 VALUES ('fff');
138+
-- This should fail, because the two transactions have a write-skew anomaly
139+
PREPARE TRANSACTION 'foo5';
140+
ERROR: prepared transactions are disabled
141+
HINT: Set max_prepared_transactions to a nonzero value.
142+
SELECT gid FROM pg_prepared_xacts;
143+
gid
144+
-----
145+
(0 rows)
146+
147+
ROLLBACK PREPARED 'foo4';
148+
ERROR: prepared transaction with identifier "foo4" does not exist
149+
SELECT gid FROM pg_prepared_xacts;
150+
gid
151+
-----
152+
(0 rows)
153+
120154
-- Clean up
121155
DROP TABLE pxtest1;
122156
-- Test subtransactions

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp