Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 80ef34f

Browse files
committed
Fix plan instability in the new tuplesort test.
At least buildfarm member florican doesn't use a material node above a sort in the mark/restore case. As material is not intended to be tested with that query, disallow.
1 parent 7d962ea commit 80ef34f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/test/regress/expected/tuplesort.out

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,7 @@ INSERT INTO test_mark_restore(col1, col2, col12)
603603
BEGIN;
604604
SET LOCAL enable_nestloop = off;
605605
SET LOCAL enable_hashjoin = off;
606+
SET LOCAL enable_material = off;
606607
-- set query into variable once, to avoid repetition of the fairly long query
607608
SELECT $$
608609
SELECT col12, count(distinct a.col1), count(distinct a.col2), count(distinct b.col1), count(distinct b.col2), count(*)
@@ -664,11 +665,10 @@ EXPLAIN (COSTS OFF) :qry;
664665
-> Sort
665666
Sort Key: a.col12 DESC
666667
-> Seq Scan on test_mark_restore a
667-
-> Materialize
668-
-> Sort
669-
Sort Key: b.col12 DESC
670-
-> Seq Scan on test_mark_restore b
671-
(15 rows)
668+
-> Sort
669+
Sort Key: b.col12 DESC
670+
-> Seq Scan on test_mark_restore b
671+
(14 rows)
672672

673673
:qry;
674674
col12 | count | count | count | count | count

src/test/regress/sql/tuplesort.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ BEGIN;
275275

276276
SET LOCAL enable_nestloop = off;
277277
SET LOCAL enable_hashjoin = off;
278+
SET LOCAL enable_material = off;
278279

279280
-- set query into variable once, to avoid repetition of the fairly long query
280281
SELECT $$

0 commit comments

Comments
 (0)