Skip to content

Commit baa32ce

Browse files
committed
Try to stabilize results of new tuplesort regression test.
It appears that a concurrent autovacuum/autoanalyze run can cause changes in the plans expected by this test. To prevent that, change the tables it uses to be temp tables --- there's no need for them to be permanent, and this should save a few cycles too. Discussion: https://postgr.es/m/3244.1576160824@sss.pgh.pa.us
1 parent 6ea364e commit baa32ce

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

src/test/regress/expected/tuplesort.out

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ SET max_parallel_workers = 0;
55
-- key aborts. One easy way to achieve that is to use uuids that all
66
-- have the same prefix, as abbreviated keys for uuids just use the
77
-- first sizeof(Datum) bytes.
8-
DROP TABLE IF EXISTS abbrev_abort_uuids;
9-
NOTICE: table "abbrev_abort_uuids" does not exist, skipping
10-
CREATE TABLE abbrev_abort_uuids (
8+
CREATE TEMP TABLE abbrev_abort_uuids (
119
id serial not null,
1210
abort_increasing uuid,
1311
abort_decreasing uuid,
@@ -596,7 +594,7 @@ ROLLBACK;
596594
----
597595
-- test tuplesort mark/restore
598596
---
599-
CREATE TABLE test_mark_restore(col1 int, col2 int, col12 int);
597+
CREATE TEMP TABLE test_mark_restore(col1 int, col2 int, col12 int);
600598
-- need a few duplicates for mark/restore to matter
601599
INSERT INTO test_mark_restore(col1, col2, col12)
602600
SELECT a.i, b.i, a.i * b.i FROM generate_series(1, 500) a(i), generate_series(1, 5) b(i);
@@ -686,6 +684,3 @@ EXPLAIN (COSTS OFF) :qry;
686684
(10 rows)
687685

688686
COMMIT;
689-
-- cleanup
690-
DROP TABLE IF EXISTS abbrev_abort_uuids;
691-
DROP TABLE IF EXISTS test_mark_restore;

src/test/regress/sql/tuplesort.sql

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ SET max_parallel_workers = 0;
66
-- key aborts. One easy way to achieve that is to use uuids that all
77
-- have the same prefix, as abbreviated keys for uuids just use the
88
-- first sizeof(Datum) bytes.
9-
DROP TABLE IF EXISTS abbrev_abort_uuids;
10-
11-
CREATE TABLE abbrev_abort_uuids (
9+
CREATE TEMP TABLE abbrev_abort_uuids (
1210
id serial not null,
1311
abort_increasing uuid,
1412
abort_decreasing uuid,
@@ -266,7 +264,7 @@ ROLLBACK;
266264
-- test tuplesort mark/restore
267265
---
268266

269-
CREATE TABLE test_mark_restore(col1 int, col2 int, col12 int);
267+
CREATE TEMP TABLE test_mark_restore(col1 int, col2 int, col12 int);
270268
-- need a few duplicates for mark/restore to matter
271269
INSERT INTO test_mark_restore(col1, col2, col12)
272270
SELECT a.i, b.i, a.i * b.i FROM generate_series(1, 500) a(i), generate_series(1, 5) b(i);
@@ -298,8 +296,3 @@ EXPLAIN (COSTS OFF) :qry;
298296
:qry;
299297

300298
COMMIT;
301-
302-
303-
-- cleanup
304-
DROP TABLE IF EXISTS abbrev_abort_uuids;
305-
DROP TABLE IF EXISTS test_mark_restore;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy