diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2021-06-07 14:52:42 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2021-06-07 14:52:56 -0400 |
commit | eed17f39fa3e6c15e62ba8c4227118f506288a30 (patch) | |
tree | 94d5b42f0aa8dea7794ee0d38f753475d6da93c0 | |
parent | 5b64368742b5cdf73395bd5ddd66b5edcbc20823 (diff) | |
download | postgresql-eed17f39fa3e6c15e62ba8c4227118f506288a30.tar.gz postgresql-eed17f39fa3e6c15e62ba8c4227118f506288a30.zip |
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.
-rw-r--r-- | contrib/seg/expected/seg.out | 2 | ||||
-rw-r--r-- | contrib/seg/sql/seg.sql | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/contrib/seg/expected/seg.out b/contrib/seg/expected/seg.out index 80b0bca1568..e617dd7e299 100644 --- a/contrib/seg/expected/seg.out +++ b/contrib/seg/expected/seg.out @@ -930,6 +930,7 @@ SELECT '1'::seg <@ '-1 .. 1'::seg AS bool; CREATE TABLE test_seg (s seg); \copy test_seg from 'data/test_seg.data' CREATE INDEX test_seg_ix ON test_seg USING gist (s); +SET enable_indexscan = false; EXPLAIN (COSTS OFF) SELECT count(*) FROM test_seg WHERE s @> '11..11.3'; QUERY PLAN @@ -947,6 +948,7 @@ SELECT count(*) FROM test_seg WHERE s @> '11..11.3'; 143 (1 row) +RESET enable_indexscan; SET enable_bitmapscan = false; EXPLAIN (COSTS OFF) SELECT count(*) FROM test_seg WHERE s @> '11..11.3'; diff --git a/contrib/seg/sql/seg.sql b/contrib/seg/sql/seg.sql index 1d7bad7c376..6fe33e90e4e 100644 --- a/contrib/seg/sql/seg.sql +++ b/contrib/seg/sql/seg.sql @@ -217,9 +217,11 @@ CREATE TABLE test_seg (s seg); CREATE INDEX test_seg_ix ON test_seg USING gist (s); +SET enable_indexscan = false; EXPLAIN (COSTS OFF) 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; EXPLAIN (COSTS OFF) |