From: Tomas Vondra Date: Sun, 22 Jan 2017 16:43:19 +0000 (+0100) Subject: add pgxc_prepared_xact results to prepared_xacts expected output X-Git-Tag: XL_10_R1BETA1~419 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=d4072de61c45b416da6abeb1c29243e8a223e7aa;p=postgres-xl.git add pgxc_prepared_xact results to prepared_xacts expected output The SQL file was calling pgxc_prepared_xact(), but the results were not included in the expected file. --- diff --git a/src/test/regress/expected/prepared_xacts.out b/src/test/regress/expected/prepared_xacts.out index f343cc0abb..b795fc8151 100644 --- a/src/test/regress/expected/prepared_xacts.out +++ b/src/test/regress/expected/prepared_xacts.out @@ -31,6 +31,13 @@ SELECT gid FROM pg_prepared_xacts ORDER BY gid; foo1 (1 row) +-- Test pgxc_prepared_xacts system view +SELECT pgxc_prepared_xact FROM pgxc_prepared_xacts ORDER by 1; + pgxc_prepared_xact +-------------------- + foo1 +(1 row) + -- Test ROLLBACK PREPARED ROLLBACK PREPARED 'foo1'; SELECT * FROM pxtest1 ORDER BY foobar; @@ -39,11 +46,18 @@ SELECT * FROM pxtest1 ORDER BY foobar; aaa (1 row) +-- Check prepared transactions on Coordinator SELECT gid FROM pg_prepared_xacts ORDER BY gid; gid ----- (0 rows) +-- Check prepared transactions in the cluster +SELECT pgxc_prepared_xact FROM pgxc_prepared_xacts ORDER by 1; + pgxc_prepared_xact +-------------------- +(0 rows) + -- Test COMMIT PREPARED BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; INSERT INTO pxtest1 VALUES ('ddd'); @@ -80,19 +94,27 @@ SELECT * FROM pxtest1 ORDER BY foobar; (2 rows) PREPARE TRANSACTION 'foo3'; +-- Check prepared transactions on Coordinator SELECT gid FROM pg_prepared_xacts ORDER BY gid; gid ------ foo3 (1 row) +-- Check prepared transactions in the cluster +SELECT pgxc_prepared_xact FROM pgxc_prepared_xacts ORDER by 1; + pgxc_prepared_xact +-------------------- + foo3 +(1 row) + BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; INSERT INTO pxtest1 VALUES ('fff'); SELECT * FROM pxtest1 ORDER BY foobar; -- This should fail, because the gid foo3 is already in use PREPARE TRANSACTION 'foo3'; ERROR: transaction identifier "foo3" is already in use -SELECT * FROM pxtest1; +SELECT * FROM pxtest1 ORDER BY foobar; foobar -------- aaa @@ -100,7 +122,7 @@ SELECT * FROM pxtest1; (2 rows) ROLLBACK PREPARED 'foo3'; -SELECT * FROM pxtest1; +SELECT * FROM pxtest1 ORDER BY foobar; foobar -------- aaa @@ -238,6 +260,13 @@ SELECT gid FROM pg_prepared_xacts; regress-two (1 row) +-- Check prepared transactions in the cluster +SELECT pgxc_prepared_xact FROM pgxc_prepared_xacts ORDER by 1; + pgxc_prepared_xact +-------------------- + regress-two +(1 row) + -- Commit table drop COMMIT PREPARED 'regress-two'; SELECT * FROM pxtest3; @@ -250,6 +279,12 @@ SELECT gid FROM pg_prepared_xacts ORDER BY gid; ----- (0 rows) +-- Check prepared transactions in the cluster +SELECT pgxc_prepared_xact FROM pgxc_prepared_xacts ORDER by 1; + pgxc_prepared_xact +-------------------- +(0 rows) + -- Clean up DROP TABLE pxtest2; DROP TABLE pxtest3; -- will still be there if prepared xacts are disabled