public inbox for [email protected]  
help / color / mirror / Atom feed
From: Masahiko Sawada <[email protected]>
To: Sami Imseih <[email protected]>
Cc: Alexander Lakhin <[email protected]>
Cc: pgsql-hackers <[email protected]>
Cc: Daniil Davydov <[email protected]>
Subject: Re: test_autovacuum/001_parallel_autovacuum is broken
Date: Thu, 9 Apr 2026 15:11:24 -0700
Message-ID: <CAD21AoBVwNJo9We6tT1p96ZMNZom7OCr4tx1Z3AiDTv1oS8Vjg@mail.gmail.com> (raw)
In-Reply-To: <CAA5RZ0uOSnAKX4xF0PBSZqYCxUMTnheAKkcsiQDNYTZg20ognQ@mail.gmail.com>
References: <CAA5RZ0s+kZZRMSF4HW7tZ9W2jS1o4B+Fg8dr5a-T6mANX+mdQA@mail.gmail.com>
	<[email protected]>
	<CAD21AoCj=OSxoh3RBw0VWJ7Y7c9EipRhpatcZaHuXKGLWyKgdQ@mail.gmail.com>
	<CAA5RZ0uqvjxv5HPzz36UEq-LUf8F+kae61k0imaGw0C0XGa7nw@mail.gmail.com>
	<CAD21AoBte7CSVRpnOvXibYPsqOE9aswsp7jrQW+8fhwxRZFWpg@mail.gmail.com>
	<CAA5RZ0uOSnAKX4xF0PBSZqYCxUMTnheAKkcsiQDNYTZg20ognQ@mail.gmail.com>

On Thu, Apr 9, 2026 at 1:14 PM Sami Imseih <[email protected]> wrote:
>
> > 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.
>
> Made the comment less verbose but in the same spirit as the above.
>
>
> > > > 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.
>
> removed av_count and pg_stat_user_tables query, but hardened the
> regexp a bit to ensure that the parallel logging is for the test_autovac
> table. It gives the same assurance as counting pg_stat_user_tables
> and will be better if we add another parallel test table in the future.

I believe that we don't need to worry about the regexp for this test.
Parallel vacuum would be used on all tables having more than one
index, but we enable the autovacuum logs only on the test_autovac
table.

Regards,

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





view thread (20+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: test_autovacuum/001_parallel_autovacuum is broken
  In-Reply-To: <CAD21AoBVwNJo9We6tT1p96ZMNZom7OCr4tx1Z3AiDTv1oS8Vjg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox