postgres.git / summary / log / commit / refs
commit 45401c1c25fe1ef14bf68089de86bcb5cce9f453
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sun Oct 09 03:45:58 2011 +0000
First released in: 9.2.0
Prevent index-only scans in stats regression test.
This bollixes the test because it's expecting to see the idx_tup_fetch
counter increase, which won't happen if heap fetches were avoided by use
of an index-only scan. Per buildfarm results.
While at it, let's just make sure that enable_seqscan and enable_indexscan
are ON for this test ...
src/test/regress/expected/stats.out | 5 +++++
src/test/regress/sql/stats.sql | 6 ++++++
2 files changed, 11 insertions(+)
diff --git a/src/test/regress/expected/stats.out b/src/test/regress/expected/stats.out
index 00811e2145f..56bace1187b 100644
--- a/src/test/regress/expected/stats.out
+++ b/src/test/regress/expected/stats.out
@@ -11,6 +11,11 @@ SHOW track_counts; -- must be on
on
(1 row)
+-- ensure that both seqscan and indexscan plans are allowed
+SET enable_seqscan TO on;
+SET enable_indexscan TO on;
+-- for the moment, we don't want index-only scans here
+SET enable_indexonlyscan TO off;
-- wait to let any prior tests finish dumping out stats;
-- else our messages might get lost due to contention
SELECT pg_sleep(2.0);
diff --git a/src/test/regress/sql/stats.sql b/src/test/regress/sql/stats.sql
index 4a72a949f29..bb349b2dfa6 100644
--- a/src/test/regress/sql/stats.sql
+++ b/src/test/regress/sql/stats.sql
@@ -8,6 +8,12 @@
-- conditio sine qua non
SHOW track_counts; -- must be on
+-- ensure that both seqscan and indexscan plans are allowed
+SET enable_seqscan TO on;
+SET enable_indexscan TO on;
+-- for the moment, we don't want index-only scans here
+SET enable_indexonlyscan TO off;
+
-- wait to let any prior tests finish dumping out stats;
-- else our messages might get lost due to contention
SELECT pg_sleep(2.0);
[parent: c78d8cd1464b]