Fix flakey pg_stat_io test
authorAndres Freund
Tue, 7 Mar 2023 18:03:42 +0000 (10:03 -0800)
committerAndres Freund
Tue, 7 Mar 2023 18:08:38 +0000 (10:08 -0800)
commit1be0fdb9de559ce8daf6d5603f0329cbd056111a
treea977eda4ead980f985d9d62e2276513e2318345a
parente20b1ea1575cb523821d51e9934d8d6dab835335
Fix flakey pg_stat_io test

Wrap test of pg_stat_io's tracking of shared buffer reads in a transaction to
prevent concurrent accesses (e.g. by autovacuum) causing spurious test
failures.

Reported-by: Tom Lane
Author: Melanie Plageman 
Discussion: https://www.postgresql.org/message-id/20230306190919.ai6mxdq3sygyyths%40awork3.anarazel.de
src/test/regress/expected/stats.out
src/test/regress/sql/stats.sql