Adjust the alternative expected output file for prepared_xacts test case,
used when max_prepared_transactions=0, for the recent changes in the test case.
This commit is contained in:
parent
1eea8e8a06
commit
38c0e72180
@ -92,13 +92,6 @@ SELECT gid FROM pg_prepared_xacts;
|
|||||||
|
|
||||||
BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
||||||
INSERT INTO pxtest1 VALUES ('fff');
|
INSERT INTO pxtest1 VALUES ('fff');
|
||||||
SELECT * FROM pxtest1;
|
|
||||||
foobar
|
|
||||||
--------
|
|
||||||
aaa
|
|
||||||
fff
|
|
||||||
(2 rows)
|
|
||||||
|
|
||||||
-- This should fail, because the gid foo3 is already in use
|
-- This should fail, because the gid foo3 is already in use
|
||||||
PREPARE TRANSACTION 'foo3';
|
PREPARE TRANSACTION 'foo3';
|
||||||
ERROR: prepared transactions are disabled
|
ERROR: prepared transactions are disabled
|
||||||
@ -117,6 +110,47 @@ SELECT * FROM pxtest1;
|
|||||||
aaa
|
aaa
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
|
-- Test serialization failure (SSI)
|
||||||
|
BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
||||||
|
UPDATE pxtest1 SET foobar = 'eee' WHERE foobar = 'ddd';
|
||||||
|
SELECT * FROM pxtest1;
|
||||||
|
foobar
|
||||||
|
--------
|
||||||
|
aaa
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
PREPARE TRANSACTION 'foo4';
|
||||||
|
ERROR: prepared transactions are disabled
|
||||||
|
HINT: Set max_prepared_transactions to a nonzero value.
|
||||||
|
SELECT gid FROM pg_prepared_xacts;
|
||||||
|
gid
|
||||||
|
-----
|
||||||
|
(0 rows)
|
||||||
|
|
||||||
|
BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
||||||
|
SELECT * FROM pxtest1;
|
||||||
|
foobar
|
||||||
|
--------
|
||||||
|
aaa
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
INSERT INTO pxtest1 VALUES ('fff');
|
||||||
|
-- This should fail, because the two transactions have a write-skew anomaly
|
||||||
|
PREPARE TRANSACTION 'foo5';
|
||||||
|
ERROR: prepared transactions are disabled
|
||||||
|
HINT: Set max_prepared_transactions to a nonzero value.
|
||||||
|
SELECT gid FROM pg_prepared_xacts;
|
||||||
|
gid
|
||||||
|
-----
|
||||||
|
(0 rows)
|
||||||
|
|
||||||
|
ROLLBACK PREPARED 'foo4';
|
||||||
|
ERROR: prepared transaction with identifier "foo4" does not exist
|
||||||
|
SELECT gid FROM pg_prepared_xacts;
|
||||||
|
gid
|
||||||
|
-----
|
||||||
|
(0 rows)
|
||||||
|
|
||||||
-- Clean up
|
-- Clean up
|
||||||
DROP TABLE pxtest1;
|
DROP TABLE pxtest1;
|
||||||
-- Test subtransactions
|
-- Test subtransactions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user