Fix flakey pg_stat_io test

Andres Freund <andres@anarazel.de>

Commit: 1be0fdb9de559ce8daf6d5603f0329cbd056111a
Author: Andres Freund <andres@anarazel.de>
Date: 2023-03-07T18:08:38Z
Releases: 16.0
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 <tgl@sss.pgh.pa.us>
Author: Melanie Plageman <melanieplageman@gmail.com>
Discussion: https://www.postgresql.org/message-id/20230306190919.ai6mxdq3sygyyths%40awork3.anarazel.de

Files

PathChange+/−
src/test/regress/expected/stats.out modified +4 −0
src/test/regress/sql/stats.sql modified +4 −0

Discussion