Fix unstable log verification in test_autovacuum.
Masahiko Sawada <msawada@postgresql.org>
Author:
Masahiko Sawada <msawada@postgresql.org>
Date: 2026-04-10T23:01:42Z
Releases:
19 (unreleased)
Fix unstable log verification in test_autovacuum. The test in test_autovacuum was unstable because it called log_contains() immediately after verifying autovacuum_count in pg_stat_user_tables. This created a race condition where the statistics could be updated before the autovacuum logs were fully flushed to disk. This commit replaces log_contains() with wait_for_log() to ensure the test waits for the parallel vacuum messages to appear. Additionally, remove the checks of the autovacuum count. Verifying the log messages is sufficient to confirm parallel autovacuum behavior, as logging is only enabled for the specific table under test. Per report from buildfarm member flaviventris. Author: Sami Imseih <samimseih@gmail.com> Discussion: https://postgr.es/m/525d0f48-93f7-493f-a988-f39b460a79bc@gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/test/modules/test_autovacuum/t/001_parallel_autovacuum.pl | modified | +12 −28 |
Discussion
- test_autovacuum/001_parallel_autovacuum is broken 20 messages · 2026-04-07 → 2026-04-09