Improve the regression tests of VACUUM (PROCESS_TOAST)
authorMichael Paquier <michael@paquier.xyz>
Mon, 6 Mar 2023 06:40:56 +0000 (15:40 +0900)
committerMichael Paquier <michael@paquier.xyz>
Mon, 6 Mar 2023 06:40:56 +0000 (15:40 +0900)
commit46d490ac19a7ca93a5c0f47e5a0e759b5385a8ae
tree5fbfbc13c09ffd6cfc68bfc0fc7a79872139305d
parent9effa5523601de52c94fb778b4a00a183a9aa056
Improve the regression tests of VACUUM (PROCESS_TOAST)

All the regression tests of VACUUM (PROCESS_TOAST) were only checking if
the commands were able to run, without checking if VACUUM was really
running on what it should.  This expands this set of tests so as we now
look at pg_stat_all_tables.vacuum_count to see how many vacuums have
been run on a given table and its toast relation.

Extracted from a larger patch by the same author, as this is useful on
its own.

Special thanks to Álvaro Herrera for the idea of using
pg_stat_all_tables to check the state of the toast relation.

Author: Nathan Bossart
Reviewed-by: Masahiko Sawada
Discussion: https://postgr.es/m/20221230000028.GA435655@nathanxps13
src/test/regress/expected/vacuum.out
src/test/regress/sql/vacuum.sql