From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com> |
Cc: | Mahendra Singh Thalor <mahi6run(at)gmail(dot)com>, Amit Langote <langote_amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Claudio Freire <klaussfreire(at)gmail(dot)com>, David Steele <david(at)pgmasters(dot)net>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Sergei Kornilov <sk(at)zsrv(dot)org>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> |
Subject: | Re: [HACKERS] Block level parallel vacuum |
Date: | 2020-01-14 12:43:22 |
Message-ID: | CAA4eK1KgD+SnP4iddBNQP8fDOWLfKCJMo0G0witwz47sd9fhKw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jan 14, 2020 at 10:04 AM Masahiko Sawada
<masahiko(dot)sawada(at)2ndquadrant(dot)com> wrote:
>
> On Mon, 13 Jan 2020 at 12:50, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> > On Sat, Jan 11, 2020 at 7:48 PM Masahiko Sawada
> > <masahiko(dot)sawada(at)2ndquadrant(dot)com> wrote:
> >
> > Okay, would it better if we get rid of this variable and have code like below?
> >
> > /* Skip the indexes that can be processed by parallel workers */
> > if ( !(get_indstats(lps->lvshared, i) == NULL ||
> > skip_parallel_vacuum_index(Irel[i], lps->lvshared)))
> > continue;
>
> Make sense to me.
>
I have changed the comment and condition to make it a positive test so
that it is more clear.
> > ...
> > > Agreed. But with the updated patch the PARALLEL option without the
> > > parallel degree doesn't display warning because params->nworkers = 0
> > > in that case. So how about restoring params->nworkers at the end of
> > > vacuum_rel()?
> > >
> >
> > I had also thought on those lines, but I was not entirely sure about
> > this resetting of workers. Today, again thinking about it, it seems
> > the idea Mahendra is suggesting that is giving an error if the
> > parallel degree is not specified seems reasonable to me. This means
> > Vacuum (parallel), Vacuum (parallel) <tbl_name>, etc. will give an
> > error "parallel degree must be specified". This idea has merit as now
> > we are supporting a parallel vacuum by default, so a 'parallel' option
> > without a parallel degree doesn't have any meaning. If we do that,
> > then we don't need to do anything additional about the handling of
> > temp tables (other than what patch is already doing) as well. What do
> > you think?
> >
>
> Good point! Agreed.
>
Thanks, changed accordingly.
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
v47-0001-Introduce-IndexAM-fields-for-parallel-vacuum.patch | application/octet-stream | 10.4 KB |
v47-0002-Allow-vacuum-command-to-process-indexes-in-parallel.patch | application/octet-stream | 79.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2020-01-14 12:46:42 | Re: [HACKERS] Block level parallel vacuum |
Previous Message | Luis Carril | 2020-01-14 11:52:49 | Re: Option to dump foreign data in pg_dump |