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: "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>, "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-15 08:02:51
Message-ID: CAD21AoB3ootVGWpc4YBn5Wo_UUFWcp2chFkT9XFO5aj5hxHzQg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 14, 2021 at 12:03 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Tue, Dec 14, 2021 at 7:40 AM tanghy(dot)fnst(at)fujitsu(dot)com
> <tanghy(dot)fnst(at)fujitsu(dot)com> wrote:
> >
> > On Monday, December 13, 2021 2:12 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> > >
> > > On Mon, Dec 13, 2021 at 2:09 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> > > >
> > > > On Mon, Dec 13, 2021 at 10:33 AM Masahiko Sawada
> > > <sawada(dot)mshk(at)gmail(dot)com> wrote:
> > > > >
> > > > > On Fri, Dec 10, 2021 at 9:08 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
> > > wrote:
> > > > > >
> > > > > > On Thu, Dec 9, 2021 at 6:05 PM Masahiko Sawada
> > > <sawada(dot)mshk(at)gmail(dot)com> wrote:
> > > > > > >
> > > > > > > On Thu, Dec 9, 2021 at 7:44 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
> > > wrote:
> > > > > > >
> > > > > > > Agreed with the above two points.
> > > > > > >
> > > > > > > I've attached updated patches that incorporated the above comments
> > > > > > > too. Please review them.
> > > > > > >
> > > > > >
> > > > > > I have made the following minor changes to the 0001 patch: (a) An
> > > > > > assert was removed from dead_items_max_items() which I added back. (b)
> > > > > > Removed an unnecessary semicolon from one of the statements in
> > > > > > compute_parallel_vacuum_workers(). (c) Changed comments at a few
> > > > > > places. (d) moved all parallel_vacuum_* related functions together.
> > > > > > (e) ran pgindent and slightly modify the commit message.
> > > > > >
> > > > > > Let me know what you think of the attached?
> > > > >
> > > > > Thank you for updating the patch!
> > > > >
> > > > > The patch also moves some functions, e.g., update_index_statistics()
> > > > > is moved without code changes. I agree to move functions for
> > > > > consistency but that makes the review hard and the patch complicated.
> > > > > I think it's better to do improving the parallel vacuum code and
> > > > > moving functions in separate patches.
> > > > >
> > > >
> > > > Okay, I thought it might be better to keep all parallel_vacuum_*
> > > > related functions together but we can keep that in a separate patch
> > > > Feel free to submit without those changes.
> > >
> > > I've attached the patch. I've just moved some functions back but not
> > > done other changes.
> > >
> >
> > Thanks for your patch.
> >
> > I tested your patch and tried some cases, like large indexes, different types of indexes, it worked well.
> >
> > Besides, I noticed a typo as follows:
> >
> > + /* Estimate size for index vacuum stats -- PARALLEL_VACUUM_KEY_STATS */
> >
> > "PARALLEL_VACUUM_KEY_STATS" should be "PARALLEL_VACUUM_KEY_INDEX_STATS".
> >
>
> Thanks, I can take care of this before committing. The v9-0001* looks
> good to me as well, so, I am planning to commit that tomorrow unless I
> see more comments or any objection to that.

Thanks!

> There is still pending
> work related to moving parallel vacuum code to a separate file and a
> few other pending comments that are still under discussion. We can
> take care of those in subsequent patches. Do, let me know if you or
> others think differently?

I'm on the same page.

I've attached an updated patch. The patch incorporated several changes
from the last version:

* Rename parallel_vacuum_begin() to parallel_vacuum_init()
* Unify the terminology; use "index bulk-deletion" and "index cleanup"
instead of "index vacuum" and "index cleanup".
* Fix the comment of parallel_vacuum_init() pointed out by Andres
* Fix a typo that is left in commit 22bd3cbe0c (pointed out by Hou)

Please review it.

Regards,

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

Attachment Content-Type Size
v8-0001-Move-parallel-vacuum-code-to-vacuumparallel.c.patch application/octet-stream 91.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Nancarrow 2021-12-15 08:22:34 Re: row filtering for logical replication
Previous Message Kyotaro Horiguchi 2021-12-15 07:20:55 Re: Strange behavior with polygon and NaN