mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-04 23:47:01 +02:00
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 de1d042f5
. 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.
This commit is contained in:
parent
fc896f45d6
commit
9ddd1c27ee
@ -930,6 +930,7 @@ SELECT '1'::seg <@ '-1 .. 1'::seg AS bool;
|
|||||||
CREATE TABLE test_seg (s seg);
|
CREATE TABLE test_seg (s seg);
|
||||||
\copy test_seg from 'data/test_seg.data'
|
\copy test_seg from 'data/test_seg.data'
|
||||||
CREATE INDEX test_seg_ix ON test_seg USING gist (s);
|
CREATE INDEX test_seg_ix ON test_seg USING gist (s);
|
||||||
|
SET enable_indexscan = false;
|
||||||
EXPLAIN (COSTS OFF)
|
EXPLAIN (COSTS OFF)
|
||||||
SELECT count(*) FROM test_seg WHERE s @> '11..11.3';
|
SELECT count(*) FROM test_seg WHERE s @> '11..11.3';
|
||||||
QUERY PLAN
|
QUERY PLAN
|
||||||
@ -947,6 +948,7 @@ SELECT count(*) FROM test_seg WHERE s @> '11..11.3';
|
|||||||
143
|
143
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
|
RESET enable_indexscan;
|
||||||
SET enable_bitmapscan = false;
|
SET enable_bitmapscan = false;
|
||||||
EXPLAIN (COSTS OFF)
|
EXPLAIN (COSTS OFF)
|
||||||
SELECT count(*) FROM test_seg WHERE s @> '11..11.3';
|
SELECT count(*) FROM test_seg WHERE s @> '11..11.3';
|
||||||
|
@ -217,9 +217,11 @@ CREATE TABLE test_seg (s seg);
|
|||||||
|
|
||||||
CREATE INDEX test_seg_ix ON test_seg USING gist (s);
|
CREATE INDEX test_seg_ix ON test_seg USING gist (s);
|
||||||
|
|
||||||
|
SET enable_indexscan = false;
|
||||||
EXPLAIN (COSTS OFF)
|
EXPLAIN (COSTS OFF)
|
||||||
SELECT count(*) FROM test_seg WHERE s @> '11..11.3';
|
SELECT count(*) FROM test_seg WHERE s @> '11..11.3';
|
||||||
SELECT count(*) FROM test_seg WHERE s @> '11..11.3';
|
SELECT count(*) FROM test_seg WHERE s @> '11..11.3';
|
||||||
|
RESET enable_indexscan;
|
||||||
|
|
||||||
SET enable_bitmapscan = false;
|
SET enable_bitmapscan = false;
|
||||||
EXPLAIN (COSTS OFF)
|
EXPLAIN (COSTS OFF)
|
||||||
|
Loading…
Reference in New Issue
Block a user