diff --git a/src/test/regress/expected/stats.out b/src/test/regress/expected/stats.out
index a811265..91c061b 100644
*** a/src/test/regress/expected/stats.out
--- b/src/test/regress/expected/stats.out
*************** SET enable_seqscan TO on;
*** 16,31 ****
  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_for('2 seconds');
-  pg_sleep_for 
- --------------
-  
- (1 row)
- 
  -- save counters
! CREATE TEMP TABLE prevstats AS
  SELECT t.seq_scan, t.seq_tup_read, t.idx_scan, t.idx_tup_fetch,
         (b.heap_blks_read + b.heap_blks_hit) AS heap_blks,
         (b.idx_blks_read + b.idx_blks_hit) AS idx_blks,
--- 16,23 ----
  SET enable_indexscan TO on;
  -- for the moment, we don't want index-only scans here
  SET enable_indexonlyscan TO off;
  -- save counters
! CREATE TABLE prevstats AS
  SELECT t.seq_scan, t.seq_tup_read, t.idx_scan, t.idx_tup_fetch,
         (b.heap_blks_read + b.heap_blks_hit) AS heap_blks,
         (b.idx_blks_read + b.idx_blks_hit) AS idx_blks,
*************** begin
*** 66,72 ****
      exit when updated1 and updated2 and updated3;
  
      -- wait a little
!     perform pg_sleep(0.1);
  
      -- reset stats snapshot so we can test again
      perform pg_stat_clear_snapshot();
--- 58,64 ----
      exit when updated1 and updated2 and updated3;
  
      -- wait a little
!     perform pg_sleep_for('100 milliseconds');
  
      -- reset stats snapshot so we can test again
      perform pg_stat_clear_snapshot();
*************** SELECT count(*) FROM tenk2 WHERE unique1
*** 143,156 ****
       1
  (1 row)
  
! -- force the rate-limiting logic in pgstat_report_stat() to time out
! -- and send a message
! SELECT pg_sleep(1.0);
!  pg_sleep 
! ----------
!  
! (1 row)
! 
  -- wait for stats collector to update
  SELECT wait_for_stats();
   wait_for_stats 
--- 135,147 ----
       1
  (1 row)
  
! -- We can't just call wait_for_stats() at this point, because we only
! -- transmit stats when the session goes idle, and we probably didn't
! -- transmit the last couple of counts yet thanks to the rate-limiting logic
! -- in pgstat_report_stat().  But instead of waiting for the rate limiter's
! -- timeout to elapse, let's just start a new session.  The old one will
! -- then send its stats before dying.
! \c -
  -- wait for stats collector to update
  SELECT wait_for_stats();
   wait_for_stats 
*************** FROM prevstats AS pr;
*** 199,202 ****
--- 190,194 ----
  (1 row)
  
  DROP TABLE trunc_stats_test, trunc_stats_test1, trunc_stats_test2, trunc_stats_test3, trunc_stats_test4;
+ DROP TABLE prevstats;
  -- End of Stats Test
diff --git a/src/test/regress/sql/stats.sql b/src/test/regress/sql/stats.sql
index b3e2efa..1c21f38 100644
*** a/src/test/regress/sql/stats.sql
--- b/src/test/regress/sql/stats.sql
*************** SET enable_indexscan TO on;
*** 14,25 ****
  -- 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_for('2 seconds');
- 
  -- save counters
! CREATE TEMP TABLE prevstats AS
  SELECT t.seq_scan, t.seq_tup_read, t.idx_scan, t.idx_tup_fetch,
         (b.heap_blks_read + b.heap_blks_hit) AS heap_blks,
         (b.idx_blks_read + b.idx_blks_hit) AS idx_blks,
--- 14,21 ----
  -- for the moment, we don't want index-only scans here
  SET enable_indexonlyscan TO off;
  
  -- save counters
! CREATE TABLE prevstats AS
  SELECT t.seq_scan, t.seq_tup_read, t.idx_scan, t.idx_tup_fetch,
         (b.heap_blks_read + b.heap_blks_hit) AS heap_blks,
         (b.idx_blks_read + b.idx_blks_hit) AS idx_blks,
*************** begin
*** 61,67 ****
      exit when updated1 and updated2 and updated3;
  
      -- wait a little
!     perform pg_sleep(0.1);
  
      -- reset stats snapshot so we can test again
      perform pg_stat_clear_snapshot();
--- 57,63 ----
      exit when updated1 and updated2 and updated3;
  
      -- wait a little
!     perform pg_sleep_for('100 milliseconds');
  
      -- reset stats snapshot so we can test again
      perform pg_stat_clear_snapshot();
*************** SELECT count(*) FROM tenk2;
*** 137,145 ****
  -- do an indexscan
  SELECT count(*) FROM tenk2 WHERE unique1 = 1;
  
! -- force the rate-limiting logic in pgstat_report_stat() to time out
! -- and send a message
! SELECT pg_sleep(1.0);
  
  -- wait for stats collector to update
  SELECT wait_for_stats();
--- 133,145 ----
  -- do an indexscan
  SELECT count(*) FROM tenk2 WHERE unique1 = 1;
  
! -- We can't just call wait_for_stats() at this point, because we only
! -- transmit stats when the session goes idle, and we probably didn't
! -- transmit the last couple of counts yet thanks to the rate-limiting logic
! -- in pgstat_report_stat().  But instead of waiting for the rate limiter's
! -- timeout to elapse, let's just start a new session.  The old one will
! -- then send its stats before dying.
! \c -
  
  -- wait for stats collector to update
  SELECT wait_for_stats();
*************** SELECT pr.snap_ts < pg_stat_get_snapshot
*** 165,168 ****
--- 165,169 ----
  FROM prevstats AS pr;
  
  DROP TABLE trunc_stats_test, trunc_stats_test1, trunc_stats_test2, trunc_stats_test3, trunc_stats_test4;
+ DROP TABLE prevstats;
  -- End of Stats Test
