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

Commit 9bf559d

Browse files
committed
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.
1 parent a053437 commit 9bf559d

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/test/regress/expected/stats.out

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ SHOW stats_start_collector; -- must be on
1111
on
1212
(1 row)
1313

14+
-- wait to let any prior tests finish dumping out stats;
15+
-- else our messages might get lost due to contention
16+
SELECT pg_sleep(2.0);
17+
pg_sleep
18+
----------
19+
20+
(1 row)
21+
1422
-- save counters
1523
CREATE TEMP TABLE prevstats AS
1624
SELECT t.seq_scan, t.seq_tup_read, t.idx_scan, t.idx_tup_fetch,

src/test/regress/sql/stats.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
-- conditio sine qua non
99
SHOW stats_start_collector; -- must be on
1010

11+
-- wait to let any prior tests finish dumping out stats;
12+
-- else our messages might get lost due to contention
13+
SELECT pg_sleep(2.0);
14+
1115
-- save counters
1216
CREATE TEMP TABLE prevstats AS
1317
SELECT t.seq_scan, t.seq_tup_read, t.idx_scan, t.idx_tup_fetch,

0 commit comments

Comments
 (0)