Re: test_autovacuum/001_parallel_autovacuum is broken

From: Daniil Davydov <3danissimo(at)gmail(dot)com>
To: Sami Imseih <samimseih(at)gmail(dot)com>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Alexander Lakhin <exclusion(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: test_autovacuum/001_parallel_autovacuum is broken
Date: 2026-04-09 19:32:30
Message-ID: CAJDiXgjF7qJKQrra0_NOQOoZ2D95Ac29vdYfzpbAyB9mc8dy-w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Fri, Apr 10, 2026 at 1:32 AM Sami Imseih <samimseih(at)gmail(dot)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 this approach.

Optionally, we can change the comment above to something like this:
# Wait until the parallel autovacuum on the table completes and reports the
# number of launched workers, which must correspond to the value specified in
# the reloption.

IMHO it better reflects what is going on.

--
Best regards,
Daniil Davydov

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message SATYANARAYANA NARLAPURAM 2026-04-09 19:35:13 Re: SQL:2011 Application Time Update & Delete
Previous Message Robert Haas 2026-04-09 19:29:44 PgConf.Dev 2026 - last call for community discussion sessions