| From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
|---|---|
| To: | Sami Imseih <samimseih(at)gmail(dot)com> |
| Cc: | Alexander Lakhin <exclusion(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Daniil Davydov <3danissimo(at)gmail(dot)com> |
| Subject: | Re: test_autovacuum/001_parallel_autovacuum is broken |
| Date: | 2026-04-09 22:11:24 |
| Message-ID: | CAD21AoBVwNJo9We6tT1p96ZMNZom7OCr4tx1Z3AiDTv1oS8Vjg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Apr 9, 2026 at 1:14 PM Sami Imseih <samimseih(at)gmail(dot)com> 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jim Jones | 2026-04-09 22:35:59 | Re: Truncate logs by max_log_size |
| Previous Message | SATYANARAYANA NARLAPURAM | 2026-04-09 21:37:44 | Re: Bug: WAIT FOR LSN crashes with assertion failure inside PL/pgSQL DO blocks and procedures |