Re: test_autovacuum/001_parallel_autovacuum is broken - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Re: test_autovacuum/001_parallel_autovacuum is broken
Date
Msg-id CAD21AoBte7CSVRpnOvXibYPsqOE9aswsp7jrQW+8fhwxRZFWpg@mail.gmail.com
Whole thread
In response to Re: test_autovacuum/001_parallel_autovacuum is broken  (Sami Imseih <samimseih@gmail.com>)
Responses Re: test_autovacuum/001_parallel_autovacuum is broken
List pgsql-hackers
On Thu, Apr 9, 2026 at 11:32 AM Sami Imseih <samimseih@gmail.com> wrote:
>
> > The root cause seems to me that it's not guaranteed that we can see
> > the autovacuum logs after checking the statistics (i.e.,
> > pg_stat_user_tables) as we update the statistics and then write the
> > log.
> >
> > One way to fix the test is to replace log_contains() with
> > wait_for_log(). We can also remove wait_for_autovacuum_complete()
> > logic altogether.
>
> +1. I was going to reply with exactly this. Attached is the fix.

Thank you for the patch! I agree with the overall idea. Since we
enable autovacuum log only the test_autovac table, just checking
autovacuum log works as expected.

I think we can simplify the test further by removing the logic around
the av_count variable.

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: SATYANARAYANA NARLAPURAM
Date:
Subject: Re: SQL:2011 Application Time Update & Delete
Next
From: SATYANARAYANA NARLAPURAM
Date:
Subject: Re: SQL:2011 Application Time Update & Delete