Improve stability of tests for VACUUM (SKIP_LOCKED)
authorMichael Paquier <michael@paquier.xyz>
Sat, 16 Nov 2019 06:23:50 +0000 (15:23 +0900)
committerMichael Paquier <michael@paquier.xyz>
Sat, 16 Nov 2019 06:23:50 +0000 (15:23 +0900)
commitbbaa38e824236ac106fffbf5f61e5da9b3dc1ec9
tree7eee93e5362ad74b1f9d967c5e6a27c832a5604f
parent28555a53cb75d00ed0e73f63a6481b4fffcc3dea
Improve stability of tests for VACUUM (SKIP_LOCKED)

Concurrent autovacuums running with the main regression test suite
could cause the tests with VACUUM (SKIP_LOCKED) to generate randomly
WARNING messages.  For these tests, set client_min_messages to ERROR to
get rid of those random failures, as disabling autovacuum for the
relations operated would not completely close the failure window.

For isolation tests, disable autovacuum for the relations vacuumed with
SKIP_LOCKED.  The tests are designed so as LOCK commands are taken
in a first session before running a concurrent VACUUM (SKIP_LOCKED) in a
second to generate WARNING messages, but a concurrent autovacuum could
cause the tests to be slower.

Reported-by: Tom Lane
Author: Michael Paquier
Reviewed-by: Andres Freund, Tom Lane
Discussion: https://postgr.es/m/25294.1573077278@sss.pgh.pa.us
Backpatch-through: 12
src/test/isolation/specs/vacuum-skip-locked.spec
src/test/regress/expected/vacuum.out
src/test/regress/sql/vacuum.sql