diff options
author | Andres Freund <andres@anarazel.de> | 2023-08-01 11:22:03 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2023-08-01 14:10:04 -0700 |
commit | 36ab831f9abc6f6b0ab74dd62e0faad75dbf42bf (patch) | |
tree | 466fdb15fa723b18ca1a80859065645b67b425b3 /src/backend/utils/adt/numutils.c | |
parent | 6050b6a92d1e6b5a234e96382ea711683e67d280 (diff) | |
download | postgresql-36ab831f9abc6f6b0ab74dd62e0faad75dbf42bf.tar.gz postgresql-36ab831f9abc6f6b0ab74dd62e0faad75dbf42bf.zip |
Fix pg_stat_io buffer reuse test instability
The stats regression test attempts to ensure that Buffer Access Strategy
"reuses" are being counted in pg_stat_io by vacuuming a table which is larger
than the size of the strategy ring. However, when shared buffers are in
sufficiently high demand, another backend could evict one of the blocks in the
strategy ring before the first backend has a chance to reuse the buffer. The
backend using the strategy would then evict another shared buffer and add that
buffer to the strategy ring. This counts as an eviction and not a reuse in
pg_stat_io. Count both evictions and reuses in the test to ensure it does not
fail incorrectly.
Reported-by: Jeff Davis <pgsql@j-davis.com>,
Author: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Alexander Lakhin <exclusion@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Discussion: https://postgr.es/m/CAAKRu_bNG27AxG9TdPtwsL6wg8AWbVckjmTL2t1HF=miDQuNtw@mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/numutils.c')
0 files changed, 0 insertions, 0 deletions