Re: Parallel heap vacuum

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

Hi,

On 2025-09-17 12:01:47 -0400, Robert Haas wrote:
> > I keep thinking about how we handle parallelism in index builds. The
> > index AM API did not get a bunch of new callbacks, it's all handled
> > within the existing ambuild() callback. Shouldn't we be doing something
> > like that for relation_vacuum()?
>
> I have a feeling that we might have made the wrong decision there.

You might be right.

> That approach will probably require a good deal of code to be
> duplicated for each AM. I'm not sure what the final solution should
> look like here, but we want the common parts like worker setup to use
> common code, while allowing each AM to insert its own logic in the
> places where that is needed. The challenge in my view is to figure out
> how best to arrange things so as to make that possible.

I've actually been thinking about the structure of the index build code
recently. There have been a bunch of requests, one recently on the list, to
build multiple indexes with one table scan - our current code structure would
make that a pretty hard feature to develop.

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2025-09-17 23:32:22 Re: PgStat_HashKey padding issue when passed by reference
Previous Message Andres Freund 2025-09-17 23:22:02 Re: Parallel heap vacuum