aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-01-28 03:02:31 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-01-28 03:02:31 +0000
commit9bf559dee3b84e0ed3ab26c0b133fb2035c9312d (patch)
treef331fd3166e6ed2000600b65dbd73e7fb4873798 /src
parenta053437d9ee71ba99a648a76652401dcc590cf13 (diff)
downloadpostgresql-9bf559dee3b84e0ed3ab26c0b133fb2035c9312d.tar.gz
postgresql-9bf559dee3b84e0ed3ab26c0b133fb2035c9312d.zip
Add a delay at the start of the stats test, to let any prior stats
activity quiesce. Possibly this will fix the large increase in non-reproducible stats test failures we've noted since turning on stats_row_level by default.
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/expected/stats.out8
-rw-r--r--src/test/regress/sql/stats.sql4
2 files changed, 12 insertions, 0 deletions
diff --git a/src/test/regress/expected/stats.out b/src/test/regress/expected/stats.out
index d3495ffb481..66d655a24f8 100644
--- a/src/test/regress/expected/stats.out
+++ b/src/test/regress/expected/stats.out
@@ -11,6 +11,14 @@ SHOW stats_start_collector; -- must be on
on
(1 row)
+-- wait to let any prior tests finish dumping out stats;
+-- else our messages might get lost due to contention
+SELECT pg_sleep(2.0);
+ pg_sleep
+----------
+
+(1 row)
+
-- save counters
CREATE TEMP TABLE prevstats AS
SELECT t.seq_scan, t.seq_tup_read, t.idx_scan, t.idx_tup_fetch,
diff --git a/src/test/regress/sql/stats.sql b/src/test/regress/sql/stats.sql
index 75acee647d5..412e94b516d 100644
--- a/src/test/regress/sql/stats.sql
+++ b/src/test/regress/sql/stats.sql
@@ -8,6 +8,10 @@
-- conditio sine qua non
SHOW stats_start_collector; -- must be on
+-- wait to let any prior tests finish dumping out stats;
+-- else our messages might get lost due to contention
+SELECT pg_sleep(2.0);
+
-- save counters
CREATE TEMP TABLE prevstats AS
SELECT t.seq_scan, t.seq_tup_read, t.idx_scan, t.idx_tup_fetch,