Re: [HACKERS] Block level parallel vacuum

From: Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Mahendra Singh <mahi6run(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Robert Haas <robertmhaas(at)gmail(dot)com>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, David Steele <david(at)pgmasters(dot)net>, Claudio Freire <klaussfreire(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Block level parallel vacuum
Date: 2019-11-29 13:41:05
Message-ID: CA+fd4k5aJjZq42rs1MJwww0XSWd1ZFvQfezkNMRm2p4mzaWUMA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 28 Nov 2019 at 11:57, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Thu, Nov 28, 2019 at 4:10 PM Mahendra Singh <mahi6run(at)gmail(dot)com> wrote:
> >
> > On Thu, 28 Nov 2019 at 13:32, Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com> wrote:
> >>
> >> On Wed, 27 Nov 2019 at 19:21, Mahendra Singh <mahi6run(at)gmail(dot)com> wrote:
> >> >
> >> >
> >> > Thanks for the re-based patches.
> >> >
> >> > On the top of v35 patch, I can see one compilation warning.
> >> >>
> >> >> parallel.c: In function ‘LaunchParallelWorkers’:
> >> >> parallel.c:502:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
> >> >> int i;
> >> >> ^
> >> >
> >> >
> >> > Above warning is due to one extra semicolon added at the end of declaration line in v35-0003 patch. Please fix this in next version.
> >> > + int nworkers_to_launch = Min(nworkers, pcxt->nworkers);;
> >>
> >> Thanks. I will fix it in the next version patch.
> >>
> >> >
> >> > I will continue my testing on the top of v35 patch set and will post results.
> >
> >
> > While reviewing v35 patch set and doing testing, I found that if we disable leader participation, then we are launching 1 less parallel worker than total number of indexes. (I am using max_parallel_workers = 20, max_parallel_maintenance_workers = 20)
> >
> > For example: If table have 3 indexes and we gave 6 parallel vacuum degree(leader participation is disabled), then I think, we should launch 3 parallel workers but we are launching 2 workers due to below check.
> > + nworkers = lps->nindexes_parallel_bulkdel - 1;
> > +
> > + /* Cap by the worker we computed at the beginning of parallel lazy vacuum */
> > + nworkers = Min(nworkers, lps->pcxt->nworkers);
> >
> > Please let me know your thoughts for this.

Thanks!

> I think it is probably because this part of the code doesn't consider
> PARALLEL_VACUUM_DISABLE_LEADER_PARTICIPATION. I think if we want we
> can change it but I am slightly nervous about the code complexity this
> will bring but maybe that is fine.

Right. I'll try to change so that.

Regards,

--
Masahiko Sawada http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2019-11-29 14:27:02 Re: libpq sslpassword parameter and callback function
Previous Message Fabien COELHO 2019-11-29 13:13:15 Re: pgbench -i progress output on terminal