Re: parallel vacuum comments

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Peter Geoghegan <pg(at)bowt(dot)ie>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: parallel vacuum comments
Date: 2021-12-02 12:31:02
Message-ID: CAD21AoCV68wkXUo4JmhdydTSXuOz-UGPuJR6gturCTn7UwPPqA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 30, 2021 at 4:45 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>
> On Tue, Nov 30, 2021 at 3:00 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> > On Tue, Nov 30, 2021 at 11:03 AM houzj(dot)fnst(at)fujitsu(dot)com
> > <houzj(dot)fnst(at)fujitsu(dot)com> wrote:
> > >
> > > On Mon, Nov 29, 2021 11:38 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> > > >
> > >
> > > 2)
> > > + /* Reinitialize the parallel context to relaunch parallel workers */
> > > + if (!pvs->first_time)
> > >
> > > It seems the ParallelVacuumState::first_time was not initialized before ?
> > >
> >
> > Yeah, I also notice this while looking at the patch.
>
> Thank you for the comments, Amit and Hou.
>
> >
> > One more thing it seems the patch has removed even the existing error
> > callback from parallel_vacuum_main. I suggested that we can enhance or
> > add a new one if required in a separate patch but let's keep the
> > current one as it is.
>
> Understood.
>
> >
> > Can we think of splitting the patch in the following manner: (a) the
> > patch to get rid of bitmap to represent whether particular index
> > supports parallel vacuum and rename of functions (b) any other stuff
> > to improve the current implementation, (c) move the parallel vacuum
> > related code to a separate file?
>
> Okay, I'll split the patch and submit them.
>

I've attached updated patches.

The first patch is the main patch for refactoring parallel vacuum
code; removes bitmap-related code and renames function names for
consistency. The second patch moves these parallel-related codes to
vacuumparallel.c as well as common functions that are used by both
lazyvacuum.c and vacuumparallel.c to vacuum.c. The third patch adds
regression tests for parallel vacuum on different kinds of indexes
with multiple index scans. Please review them.

Regards,

--
Masahiko Sawada
EDB: https://www.enterprisedb.com/

Attachment Content-Type Size
v4-0003-Add-regression-test-cases-for-parallel-vacuum.patch application/octet-stream 4.3 KB
v4-0001-Refactor-parallel-vacuum-to-remove-bitmap-related.patch application/octet-stream 36.2 KB
v4-0002-Move-parallel-vacuum-code-to-vacuumparallel.c.patch application/octet-stream 89.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2021-12-02 12:40:23 Re: pgbench logging broken by time logic changes
Previous Message Robert Haas 2021-12-02 11:54:04 Re: pg_dump versus ancient server versions