From 8902f79264d95ed84e4c9fb4749b3956b4c74349 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Fri, 20 Feb 2015 14:03:49 -0300 Subject: [PATCH] Remove unnecessary and unreliable test --- src/test/regress/expected/prepared_xacts.out | 50 ----------------- .../regress/expected/prepared_xacts_1.out | 53 ------------------- src/test/regress/sql/prepared_xacts.sql | 27 ---------- 3 files changed, 130 deletions(-) diff --git a/src/test/regress/expected/prepared_xacts.out b/src/test/regress/expected/prepared_xacts.out index 9dbf874b63..c0b08649e8 100644 --- a/src/test/regress/expected/prepared_xacts.out +++ b/src/test/regress/expected/prepared_xacts.out @@ -247,58 +247,8 @@ SELECT gid FROM pg_prepared_xacts; ----- (0 rows) -CREATE TABLE pxtest5 (a SERIAL); -INSERT INTO pxtest5 DEFAULT VALUES; -SELECT * FROM pxtest5; - a ---- - 1 -(1 row) - -BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; - INSERT INTO pxtest5 DEFAULT VALUES; - INSERT INTO pxtest5 DEFAULT VALUES; - TRUNCATE pxtest5; - INSERT INTO pxtest5 DEFAULT VALUES; -PREPARE TRANSACTION 'trunc-and-pgstat'; -SELECT pg_sleep(0.5); - pg_sleep ----------- - -(1 row) - -SELECT n_tup_ins, n_tup_upd, n_tup_del, n_live_tup, n_dead_tup - FROM pg_stat_user_tables - WHERE relname='pxtest5'; - n_tup_ins | n_tup_upd | n_tup_del | n_live_tup | n_dead_tup ------------+-----------+-----------+------------+------------ - 1 | 0 | 0 | 1 | 0 -(1 row) - -COMMIT PREPARED 'trunc-and-pgstat'; -SELECT pg_sleep(0.5); - pg_sleep ----------- - -(1 row) - -SELECT n_tup_ins, n_tup_upd, n_tup_del, n_live_tup, n_dead_tup - FROM pg_stat_user_tables - WHERE relname='pxtest5'; - n_tup_ins | n_tup_upd | n_tup_del | n_live_tup | n_dead_tup ------------+-----------+-----------+------------+------------ - 2 | 0 | 0 | 1 | 0 -(1 row) - -SELECT * FROM pxtest5; - a ---- - 4 -(1 row) - -- Clean up DROP TABLE pxtest2; DROP TABLE pxtest3; -- will still be there if prepared xacts are disabled ERROR: table "pxtest3" does not exist DROP TABLE pxtest4; -DROP TABLE pxtest5; diff --git a/src/test/regress/expected/prepared_xacts_1.out b/src/test/regress/expected/prepared_xacts_1.out index dfdd5eb0dc..898f278c11 100644 --- a/src/test/regress/expected/prepared_xacts_1.out +++ b/src/test/regress/expected/prepared_xacts_1.out @@ -249,62 +249,9 @@ SELECT gid FROM pg_prepared_xacts; ----- (0 rows) -CREATE TABLE pxtest5 (a SERIAL); -INSERT INTO pxtest5 DEFAULT VALUES; -SELECT * FROM pxtest5; - a ---- - 1 -(1 row) - -BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; - INSERT INTO pxtest5 DEFAULT VALUES; - INSERT INTO pxtest5 DEFAULT VALUES; - TRUNCATE pxtest5; - INSERT INTO pxtest5 DEFAULT VALUES; -PREPARE TRANSACTION 'trunc-and-pgstat'; -ERROR: prepared transactions are disabled -HINT: Set max_prepared_transactions to a nonzero value. -SELECT pg_sleep(0.5); - pg_sleep ----------- - -(1 row) - -SELECT n_tup_ins, n_tup_upd, n_tup_del, n_live_tup, n_dead_tup - FROM pg_stat_user_tables - WHERE relname='pxtest5'; - n_tup_ins | n_tup_upd | n_tup_del | n_live_tup | n_dead_tup ------------+-----------+-----------+------------+------------ - 3 | 0 | 0 | 1 | 2 -(1 row) - -COMMIT PREPARED 'trunc-and-pgstat'; -ERROR: prepared transaction with identifier "trunc-and-pgstat" does not exist -SELECT pg_sleep(0.5); - pg_sleep ----------- - -(1 row) - -SELECT n_tup_ins, n_tup_upd, n_tup_del, n_live_tup, n_dead_tup - FROM pg_stat_user_tables - WHERE relname='pxtest5'; - n_tup_ins | n_tup_upd | n_tup_del | n_live_tup | n_dead_tup ------------+-----------+-----------+------------+------------ - 3 | 0 | 0 | 1 | 2 -(1 row) - -SELECT * FROM pxtest5; - a ---- - 1 -(1 row) - -- Clean up DROP TABLE pxtest2; ERROR: table "pxtest2" does not exist DROP TABLE pxtest3; -- will still be there if prepared xacts are disabled DROP TABLE pxtest4; ERROR: table "pxtest4" does not exist -DROP TABLE pxtest5; diff --git a/src/test/regress/sql/prepared_xacts.sql b/src/test/regress/sql/prepared_xacts.sql index 56d5857ae9..7902152775 100644 --- a/src/test/regress/sql/prepared_xacts.sql +++ b/src/test/regress/sql/prepared_xacts.sql @@ -152,34 +152,7 @@ SELECT * FROM pxtest3; -- There should be no prepared transactions SELECT gid FROM pg_prepared_xacts; -CREATE TABLE pxtest5 (a SERIAL); -INSERT INTO pxtest5 DEFAULT VALUES; - -SELECT * FROM pxtest5; - -BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; - INSERT INTO pxtest5 DEFAULT VALUES; - INSERT INTO pxtest5 DEFAULT VALUES; - TRUNCATE pxtest5; - INSERT INTO pxtest5 DEFAULT VALUES; -PREPARE TRANSACTION 'trunc-and-pgstat'; - -SELECT pg_sleep(0.5); -SELECT n_tup_ins, n_tup_upd, n_tup_del, n_live_tup, n_dead_tup - FROM pg_stat_user_tables - WHERE relname='pxtest5'; - -COMMIT PREPARED 'trunc-and-pgstat'; - -SELECT pg_sleep(0.5); -SELECT n_tup_ins, n_tup_upd, n_tup_del, n_live_tup, n_dead_tup - FROM pg_stat_user_tables - WHERE relname='pxtest5'; - -SELECT * FROM pxtest5; - -- Clean up DROP TABLE pxtest2; DROP TABLE pxtest3; -- will still be there if prepared xacts are disabled DROP TABLE pxtest4; -DROP TABLE pxtest5; -- 2.40.0