Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9ddd1c2

Browse files
committed
Stabilize contrib/seg regression test.
If autovacuum comes along just after we fill table test_seg with some data, it will update the stats to the point where we prefer a plain indexscan over a bitmap scan, breaking the expected output (as well as the point of the test case). To fix, just force a bitmap scan to be chosen here. This has evidently been wrong since commit de1d042. It's not clear why we just recently saw any buildfarm failures due to it; but prairiedog has failed twice on this test in the past week. Hence, backpatch to v11 where this test case came in.
1 parent fc896f4 commit 9ddd1c2

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

contrib/seg/expected/seg.out

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,7 @@ SELECT '1'::seg <@ '-1 .. 1'::seg AS bool;
930930
CREATE TABLE test_seg (s seg);
931931
\copy test_seg from 'data/test_seg.data'
932932
CREATE INDEX test_seg_ix ON test_seg USING gist (s);
933+
SET enable_indexscan = false;
933934
EXPLAIN (COSTS OFF)
934935
SELECT count(*) FROM test_seg WHERE s @> '11..11.3';
935936
QUERY PLAN
@@ -947,6 +948,7 @@ SELECT count(*) FROM test_seg WHERE s @> '11..11.3';
947948
143
948949
(1 row)
949950

951+
RESET enable_indexscan;
950952
SET enable_bitmapscan = false;
951953
EXPLAIN (COSTS OFF)
952954
SELECT count(*) FROM test_seg WHERE s @> '11..11.3';

contrib/seg/sql/seg.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,11 @@ CREATE TABLE test_seg (s seg);
217217

218218
CREATE INDEX test_seg_ix ON test_seg USING gist (s);
219219

220+
SET enable_indexscan = false;
220221
EXPLAIN (COSTS OFF)
221222
SELECT count(*) FROM test_seg WHERE s @> '11..11.3';
222223
SELECT count(*) FROM test_seg WHERE s @> '11..11.3';
224+
RESET enable_indexscan;
223225

224226
SET enable_bitmapscan = false;
225227
EXPLAIN (COSTS OFF)

0 commit comments

Comments
 (0)