8000 Remove unnecessary and unreliable test · postgres/postgres@8902f79 · GitHub
[go: up one dir, main page]

Skip to content

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

Appearance settings

Commit 8902f79

Browse files
committed
Remove unnecessary and unreliable test
1 parent 3b14bb7 commit 8902f79

File tree

3 files changed

+0
-130
lines changed

3 files changed

+0
-130
lines changed

src/test/regress/expected/prepared_xacts.out

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -247,58 +247,8 @@ SELECT gid FROM pg_prepared_xacts;
247247
-----
248248
(0 rows)
249249

250-
CREATE TABLE pxtest5 (a SERIAL);
251-
INSERT INTO pxtest5 DEFAULT VALUES;
252-
SELECT * FROM pxtest5;
253-
a
254-
---
255-
1
256-
(1 row)
257-
258-
BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
259-
INSERT INTO pxtest5 DEFAULT VALUES;
260-
INSERT INTO pxtest5 DEFAULT VALUES;
261-
TRUNCATE pxtest5;
262-
INSERT INTO pxtest5 DEFAULT VALUES;
263-
PREPARE TRANSACTION 'trunc-and-pgstat';
264-
SELECT pg_sleep(0.5);
265-
pg_sleep
266-
----------
267-
268-
(1 row)
269-
270-
SELECT n_tup_ins, n_tup_upd, n_tup_del, n_live_tup, n_dead_tup
271-
FROM pg_stat_user_tables
272-
WHERE relname='pxtest5';
273-
n_tup_ins | n_tup_upd | n_tup_del | n_live_tup | n_dead_tup
274-
-----------+-----------+-----------+------------+------------
275-
1 | 0 | 0 | 1 | 0
276-
(1 row)
277-
278-
COMMIT PREPARED 'trunc-and-pgstat';
279-
SELECT pg_sleep(0.5);
280-
pg_sleep
281-
----------
282-
283-
(1 row)
284-
285-
SELECT n_tup_ins, n_tup_upd, n_tup_del, n_live_tup, n_dead_tup
286-
FROM pg_stat_user_tables
287-
WHERE relname='pxtest5';
288-
n_tup_ins | n_tup_upd | n_tup_del | n_live_tup | n_dead_tup
289-
-----------+-----------+-----------+------------+------------
290-
2 | 0 | 0 | 1 | 0
291-
(1 row)
292-
293-
SELECT * FROM pxtest5;
294-
a
295-
---
296-
4
297-
(1 row)
298-
299250
-- Clean up
300251
DROP TABLE pxtest2;
301252
DROP TABLE pxtest3; -- will still be there if prepared xacts are disabled
302253
ERROR: table "pxtest3" does not exist
303254
DROP TABLE pxtest4;
304-
DROP TABLE pxtest5;

src/test/regress/expected/prepared_xacts_1.out

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -249,62 +249,9 @@ SELECT gid FROM pg_prepared_xacts;
249249
-----
250250
(0 rows)
251251

252-
CREATE TABLE pxtest5 (a SERIAL);
253-
INSERT INTO pxtest5 DEFAULT VALUES;
254-
SELECT * FROM pxtest5;
255-
a
256-
---
257-
1
258-
(1 row)
259-
260-
BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
261-
INSERT INTO pxtest5 DEFAULT VALUES;
262-
INSERT INTO pxtest5 DEFAULT VALUES;
263-
TRUNCATE pxtest5;
264-
INSERT INTO pxtest5 DEFAULT VALUES;
265-
PREPARE TRANSACTION 'trunc-and-pgstat';
266-
ERROR: prepared transactions are disabled
267-
HINT: Set max_prepared_transactions to a nonzero value.
268-
SELECT pg_sleep(0.5);
269-
pg_sleep
270-
----------
271-
272-
(1 row)
273-
274-
SELECT n_tup_ins, n_tup_upd, n_tup_del, n_live_tup, n_dead_tup
275-
FROM pg_stat_user_tables
276-
WHERE relname='pxtest5';
277-
n_tup_ins | n_tup_upd | n_tup_del | n_live_tup | n_dead_tup
278-
-----------+-----------+-----------+------------+------------
279-
3 | 0 | 0 | 1 | 2
280-
(1 row)
281-
282-
COMMIT PREPARED 'trunc-and-pgstat';
283-
ERROR: prepared transaction with identifier "trunc-and-pgstat" does not exist
284-
SELECT pg_sleep(0.5);
285-
pg_sleep
286-
----------
287-
288-
(1 row)
289-
290-
SELECT n_tup_ins, n_tup_upd, n_tup_del, n_live_tup, n_dead_tup
291-
FROM pg_stat_user_tables
292-
WHERE relname='pxtest5';
293-
n_tup_ins | n_tup_upd | n_tup_del | n_live_tup | n_dead_tup
294-
-----------+-----------+-----------+------------+------------
295-
3 | 0 | 0 | 1 | 2
296-
(1 row)
297-
298-
SELECT * FROM pxtest5;
299-
a
300-
---
301-
1
302-
(1 row)
303-
304252
-- Clean up
305253
DROP TABLE pxtest2;
306254
ERROR: table "pxtest2" does not exist
307255
DROP TABLE pxtest3; -- will still be there if prepared xacts are disabled
308256
DROP TABLE pxtest4;
309257
ERROR: table "pxtest4" does not exist
310-
DROP TABLE pxtest5;

src/test/regress/sql/prepared_xacts.sql

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -152,34 +152,7 @@ SELECT * FROM pxtest3;
152152
-- There should be no prepared transactions
153153
SELECT gid FROM pg_prepared_xacts;
154154

155-
CREATE TABLE pxtest5 (a SERIAL);
156-
INSERT INTO pxtest5 DEFAULT VALUES;
157-
158-
SELECT * FROM pxtest5;
159-
160-
BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
161-
INSERT INTO pxtest5 DEFAULT VALUES;
162-
INSERT INTO pxtest5 DEFAULT VALUES;
163-
TRUNCATE pxtest5;
164-
INSERT INTO pxtest5 DEFAULT VALUES;
165-
PREPARE TRANSACTION 'trunc-and-pgstat';
166-
167-
SELECT pg_sleep(0.5);
168-
SELECT n_tup_ins, n_tup_upd, n_tup_del, n_live_tup, n_dead_tup
169-
FROM pg_stat_user_tables
170-
WHERE relname='pxtest5';
171-
172-
COMMIT PREPARED 'trunc-and-pgstat';
173-
174-
SELECT pg_sleep(0.5);
175-
SELECT n_tup_ins, n_tup_upd, n_tup_del, n_live_tup, n_dead_tup
176-
FROM pg_stat_user_tables
177-
WHERE relname='pxtest5';
178-
179-
SELECT * FROM pxtest5;
180-
181155
-- Clean up
182156
DROP TABLE pxtest2;
183157
DROP TABLE pxtest3; -- will still be there if prepared xacts are disabled
184158
DROP TABLE pxtest4;
185-
DROP TABLE pxtest5;

0 commit comments

Comments
 (0)
0