aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-12-14 15:01:56 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2019-12-14 15:01:56 -0500
commitbaa32ce28b39eccdf384e979dac5ad8be91ff44e (patch)
tree5ab1838dd8a4a0e271aa63483f1303e4651beb2c /src
parent6ea364e7e7d5f298fc965006caa6c228c743fe77 (diff)
downloadpostgresql-baa32ce28b39eccdf384e979dac5ad8be91ff44e.tar.gz
postgresql-baa32ce28b39eccdf384e979dac5ad8be91ff44e.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/expected/tuplesort.out9
-rw-r--r--src/test/regress/sql/tuplesort.sql11
2 files changed, 4 insertions, 16 deletions
diff --git a/src/test/regress/expected/tuplesort.out b/src/test/regress/expected/tuplesort.out
index 0a2fef95ce1..3fc1998bf2d 100644
--- a/src/test/regress/expected/tuplesort.out
+++ b/src/test/regress/expected/tuplesort.out
@@ -5,9 +5,7 @@ SET max_parallel_workers = 0;
-- key aborts. One easy way to achieve that is to use uuids that all
-- have the same prefix, as abbreviated keys for uuids just use the
-- first sizeof(Datum) bytes.
-DROP TABLE IF EXISTS abbrev_abort_uuids;
-NOTICE: table "abbrev_abort_uuids" does not exist, skipping
-CREATE TABLE abbrev_abort_uuids (
+CREATE TEMP TABLE abbrev_abort_uuids (
id serial not null,
abort_increasing uuid,
abort_decreasing uuid,
@@ -596,7 +594,7 @@ ROLLBACK;
----
-- test tuplesort mark/restore
---
-CREATE TABLE test_mark_restore(col1 int, col2 int, col12 int);
+CREATE TEMP TABLE test_mark_restore(col1 int, col2 int, col12 int);
-- need a few duplicates for mark/restore to matter
INSERT INTO test_mark_restore(col1, col2, col12)
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;
(10 rows)
COMMIT;
--- cleanup
-DROP TABLE IF EXISTS abbrev_abort_uuids;
-DROP TABLE IF EXISTS test_mark_restore;
diff --git a/src/test/regress/sql/tuplesort.sql b/src/test/regress/sql/tuplesort.sql
index 6b91014a6b8..7d7e02f02a8 100644
--- a/src/test/regress/sql/tuplesort.sql
+++ b/src/test/regress/sql/tuplesort.sql
@@ -6,9 +6,7 @@ SET max_parallel_workers = 0;
-- key aborts. One easy way to achieve that is to use uuids that all
-- have the same prefix, as abbreviated keys for uuids just use the
-- first sizeof(Datum) bytes.
-DROP TABLE IF EXISTS abbrev_abort_uuids;
-
-CREATE TABLE abbrev_abort_uuids (
+CREATE TEMP TABLE abbrev_abort_uuids (
id serial not null,
abort_increasing uuid,
abort_decreasing uuid,
@@ -266,7 +264,7 @@ ROLLBACK;
-- test tuplesort mark/restore
---
-CREATE TABLE test_mark_restore(col1 int, col2 int, col12 int);
+CREATE TEMP TABLE test_mark_restore(col1 int, col2 int, col12 int);
-- need a few duplicates for mark/restore to matter
INSERT INTO test_mark_restore(col1, col2, col12)
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;
:qry;
COMMIT;
-
-
--- cleanup
-DROP TABLE IF EXISTS abbrev_abort_uuids;
-DROP TABLE IF EXISTS test_mark_restore;