Re: Parallel heap vacuum - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Parallel heap vacuum
Date
Msg-id CA+TgmoY-Vrba3L08Y2dHo-kJNbKZF1Ot3KVStxXPMYKBzYWVWA@mail.gmail.com
Whole thread Raw
In response to Re: Parallel heap vacuum  (Tomas Vondra <tomas@vondra.me>)
Responses Re: Parallel heap vacuum
List pgsql-hackers
On Wed, Sep 17, 2025 at 12:23 PM Tomas Vondra <tomas@vondra.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



pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: Remove PointerIsValid()
Next
From: Andrei Lepikhov
Date:
Subject: Re: RFC: extensible planner state