Re: Vacuum o/p with (full 1, parallel 0) option throwing an error

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Mahendra Singh Thalor <mahi6run(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Vacuum o/p with (full 1, parallel 0) option throwing an error
Date: 2020-04-09 05:52:17
Message-ID: CAA4eK1J-CQ4_jt85um8WSeCRjkC4aEtB+Ft43_tFHLVS8n_CQA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 9, 2020 at 12:09 AM Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:
>
> On Thu, Apr 09, 2020 at 12:06:04AM +0530, Mahendra Singh Thalor wrote:
> > On Wed, 8 Apr 2020 at 22:11, Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:
> > >
> >
> > Thanks Justin for the patch.
> >
> > Patch looks fine to me and it is fixing the issue. After applying this
> > patch, vacuum will work as:
> >
> > 1) vacuum (parallel 1, full 0);
> > -- vacuuming will be done with 1 parallel worker.
> > 2) vacuum (parallel 0, full 1);
> > -- full vacuuming will be done.
> > 3) vacuum (parallel 1, full 1);
> > -- will give error :ERROR: cannot specify both FULL and PARALLEL options
> >
> > 3rd example is telling that we can't give both FULL and PARALLEL
> > options but in 1st and 2nd, we are giving both FULL and PARALLEL
> > options and we are not giving any error. I think, irrespective of
> > value of both FULL and PARALLEL options, we should give error in all
> > the above mentioned three cases.
>
> I think the behavior is correct, but the error message could be improved,
>

Yeah, I also think that the behavior is fine. We can do what Mahendra
is saying but that will unnecessarily block some syntax and we might
need to introduce an extra variable to detect that in code.

> like:
> |ERROR: cannot specify FULL with PARALLEL jobs
> or similar.
>

I don't see much problem with the current error message as a similar
message is used someplace else also as mentioned in my previous reply.
However, we can change it if we feel the current message is not
conveying the cause of the problem.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2020-04-09 05:55:52 Multiple FPI_FOR_HINT for the same block during killing btree index items
Previous Message Thomas Munro 2020-04-09 05:45:25 Fast DSM segments