Re: Parallel heap vacuum

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, John Naylor <johncnaylorls(at)gmail(dot)com>, Tomas Vondra <tomas(at)vondra(dot)me>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: Parallel heap vacuum
Date: 2025-08-26 15:55:39
Message-ID: CAAKRu_a0R=PPXVjBghWN9QOU0noC5_rA4bGbAwiFyO5ASpPHfw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 23, 2025 at 12:06 PM Andres Freund <andres(at)anarazel(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-08-26 16:11:05 Re: C11 / VS 2019
Previous Message Peter Eisentraut 2025-08-26 15:52:36 Re: C11 / VS 2019