Re: Parallel heap vacuum - Mailing list pgsql-hackers

From Melanie Plageman
Subject Re: Parallel heap vacuum
Date
Msg-id CAAKRu_a0R=PPXVjBghWN9QOU0noC5_rA4bGbAwiFyO5ASpPHfw@mail.gmail.com
Whole thread Raw
In response to Re: Parallel heap vacuum  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Wed, Jul 23, 2025 at 12:06 PM Andres Freund <andres@anarazel.de> wrote:
>
> On 2025-07-22 11:44:29 -0700, Masahiko Sawada wrote:
> > Do you think it makes sense to implement the above idea that we launch
> > parallel vacuum workers for heap through the same vacuumparallel.c
> > codebase and maintain the consistent interface with parallel index
> > vacuuming APIs?
>
> Yes, that might make sense. But wiring it up via tableam doesn't make sense.

If you do parallel worker setup below heap_vacuum_rel(), then how are
you supposed to use those workers to do non-heap table vacuuming?

All the code in vacuumparallel.c is invoked from below
lazy_scan_heap(), so I don't see how having a
vacuumparallel.c-specific callback struct solves the layering
violation.

It seems like parallel index vacuuming setup would have to be done in
vacuum_rel() if we want to reuse the same parallel workers for the
table vacuuming and index vacuuming phases and allow for different
table AMs to vacuum the tables in their own way using these parallel
workers.

- Melanie



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: C11 / VS 2019
Next
From: Tom Lane
Date:
Subject: Re: C11 / VS 2019