Re: Parallel heap vacuum

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tomas Vondra <tomas(at)vondra(dot)me>
Cc: Melanie Plageman <melanieplageman(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, 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 16:32:16
Message-ID: CA+TgmoY-Vrba3L08Y2dHo-kJNbKZF1Ot3KVStxXPMYKBzYWVWA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 17, 2025 at 12:23 PM Tomas Vondra <tomas(at)vondra(dot)me> wrote:
> Look at the BRIN code, for example. Most of the parallel stuff happens
> in _brin_begin_parallel. Maybe more of it could be generalized a bit
> more (some of the shmem setup?). But most of it is tied to the
> AM-specific state / how parallel builds work for that particular AM.

Well, the code for PARALLEL_KEY_WAL_USAGE, PARALLEL_KEY_BUFFER_USAGE,
and PARALLEL_KEY_QUERY_TEXT is duplicated, for instance. That's not a
ton of code, perhaps, but it may evolve over time, and having to keep
copies for a bunch of different AMs in sync is not ideal.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrei Lepikhov 2025-09-17 16:42:09 Re: RFC: extensible planner state
Previous Message Jacob Champion 2025-09-17 16:26:25 Re: Remove PointerIsValid()