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

2020-04-16 Thread Masahiko Sawada
On Thu, 16 Apr 2020 at 15:02, Amit Kapila wrote: > > On Wed, Apr 15, 2020 at 9:12 AM Amit Kapila wrote: > > > > On Wed, Apr 15, 2020 at 9:03 AM Justin Pryzby wrote: > > > > > > On Wed, Apr 15, 2020 at 08:54:17AM +0530, Amit Kapila wrote: > > > > On Tue, Apr 14, 2020 at 8:55 AM Amit Kapila > >

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

2020-04-16 Thread Amit Kapila
On Wed, Apr 15, 2020 at 9:12 AM Amit Kapila wrote: > > On Wed, Apr 15, 2020 at 9:03 AM Justin Pryzby wrote: > > > > On Wed, Apr 15, 2020 at 08:54:17AM +0530, Amit Kapila wrote: > > > On Tue, Apr 14, 2020 at 8:55 AM Amit Kapila > > > wrote: > > > > > > > > On Tue, Apr 14, 2020 at 7:52 AM

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

2020-04-14 Thread Amit Kapila
On Wed, Apr 15, 2020 at 9:03 AM Justin Pryzby wrote: > > On Wed, Apr 15, 2020 at 08:54:17AM +0530, Amit Kapila wrote: > > On Tue, Apr 14, 2020 at 8:55 AM Amit Kapila wrote: > > > > > > On Tue, Apr 14, 2020 at 7:52 AM Michael Paquier > > > wrote: > > > > > > > > > > > -VACUUM (PARALLEL 1) tmp;

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

2020-04-14 Thread Justin Pryzby
On Wed, Apr 15, 2020 at 08:54:17AM +0530, Amit Kapila wrote: > On Tue, Apr 14, 2020 at 8:55 AM Amit Kapila wrote: > > > > On Tue, Apr 14, 2020 at 7:52 AM Michael Paquier wrote: > > > > > > > > -VACUUM (PARALLEL 1) tmp; -- disables parallel vacuum option > > > +VACUUM (PARALLEL 1) tmp; --

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

2020-04-14 Thread Amit Kapila
On Tue, Apr 14, 2020 at 8:55 AM Amit Kapila wrote: > > On Tue, Apr 14, 2020 at 7:52 AM Michael Paquier wrote: > > > > > -VACUUM (PARALLEL 1) tmp; -- disables parallel vacuum option > > +VACUUM (PARALLEL 1) tmp; -- parallel vacuum disabled for temp tables > > WARNING: disabling parallel option

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

2020-04-13 Thread Amit Kapila
On Tue, Apr 14, 2020 at 7:52 AM Michael Paquier wrote: > > Makes sense. I have two comments. > > ereport(ERROR, > (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), > - errmsg("cannot specify both FULL and PARALLEL options"))); > + errmsg("VACUUM

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

2020-04-13 Thread Michael Paquier
On Mon, Apr 13, 2020 at 05:55:43PM +0530, Amit Kapila wrote: > On Mon, Apr 13, 2020 at 4:23 PM Masahiko Sawada > wrote: > I am not very sure about this. I don't think the current text is wrong > especially when you see the value we can specify there is described > as: "Specifies a non-negative

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

2020-04-13 Thread Amit Kapila
On Mon, Apr 13, 2020 at 4:23 PM Masahiko Sawada wrote: > > On Mon, 13 Apr 2020 at 18:25, Amit Kapila wrote: > > > > On Fri, Apr 10, 2020 at 7:05 PM Justin Pryzby wrote: > > > > > > > > > No problem. I think I was trying to make my text similar to that from > > > 14a4f6f37. > > > > > > I

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

2020-04-13 Thread Masahiko Sawada
On Mon, 13 Apr 2020 at 18:25, Amit Kapila wrote: > > On Fri, Apr 10, 2020 at 7:05 PM Justin Pryzby wrote: > > > > > > No problem. I think I was trying to make my text similar to that from > > 14a4f6f37. > > > > I realized that I didn't sq!uash my last patch, so it didn't include the > >

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

2020-04-13 Thread Amit Kapila
On Fri, Apr 10, 2020 at 7:05 PM Justin Pryzby wrote: > > > No problem. I think I was trying to make my text similar to that from > 14a4f6f37. > > I realized that I didn't sq!uash my last patch, so it didn't include the > functional change (which is maybe what Robert was referring to). > I think

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

2020-04-10 Thread Justin Pryzby
On Fri, Apr 10, 2020 at 10:34:02AM +0530, Amit Kapila wrote: > On Thu, Apr 9, 2020 at 2:03 PM Justin Pryzby wrote: > > On Thu, Apr 09, 2020 at 05:07:48PM +0900, Masahiko Sawada wrote: > > > Yes but the difference is that we cannot disable PARSER or COPY by > > > specifying options whereas we can

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

2020-04-09 Thread Masahiko Sawada
On Fri, 10 Apr 2020 at 14:04, Amit Kapila wrote: > > On Thu, Apr 9, 2020 at 2:03 PM Justin Pryzby wrote: > > > > On Thu, Apr 09, 2020 at 05:07:48PM +0900, Masahiko Sawada wrote: > > > Yes but the difference is that we cannot disable PARSER or COPY by > > > specifying options whereas we can do

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

2020-04-09 Thread Amit Kapila
On Thu, Apr 9, 2020 at 7:31 PM Robert Haas wrote: > > On Thu, Apr 9, 2020 at 1:36 AM Amit Kapila wrote: > > On Thu, Apr 9, 2020 at 7:07 AM Michael Paquier wrote: > > > On Wed, Apr 08, 2020 at 01:38:54PM -0500, Justin Pryzby wrote: > > > > I think the behavior is correct, but the error message

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

2020-04-09 Thread Amit Kapila
On Thu, Apr 9, 2020 at 2:03 PM Justin Pryzby wrote: > > On Thu, Apr 09, 2020 at 05:07:48PM +0900, Masahiko Sawada wrote: > > Yes but the difference is that we cannot disable PARSER or COPY by > > specifying options whereas we can do something like "VACUUM (FULL > > false) tbl" to disable FULL

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

2020-04-09 Thread Robert Haas
On Thu, Apr 9, 2020 at 1:36 AM Amit Kapila wrote: > On Thu, Apr 9, 2020 at 7:07 AM Michael Paquier wrote: > > On Wed, Apr 08, 2020 at 01:38:54PM -0500, Justin Pryzby wrote: > > > I think the behavior is correct, but the error message could be improved, > > > like: > > > |ERROR: cannot specify

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

2020-04-09 Thread Justin Pryzby
On Thu, Apr 09, 2020 at 05:07:48PM +0900, Masahiko Sawada wrote: > Yes but the difference is that we cannot disable PARSER or COPY by > specifying options whereas we can do something like "VACUUM (FULL > false) tbl" to disable FULL option. I might be misunderstanding the > meaning of "specify"

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

2020-04-09 Thread Masahiko Sawada
On Thu, 9 Apr 2020 at 16:02, Amit Kapila wrote: > > On Thu, Apr 9, 2020 at 11:54 AM Masahiko Sawada > wrote: > > > > On Thu, 9 Apr 2020 at 14:52, Amit Kapila wrote: > > > > > > > > We can do what Mahendra > > > is saying but that will unnecessarily block some syntax and we might > > > need to

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

2020-04-09 Thread Justin Pryzby
On Thu, Apr 09, 2020 at 12:31:55PM +0530, Amit Kapila wrote: > Sure, we can change that, but isn't the existing example of similar > message "cannot specify both PARSER and COPY options" occurs when > both the options have valid values? If so, we can use a similar > principle here, no? A better

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

2020-04-09 Thread Michael Paquier
On Thu, Apr 09, 2020 at 12:33:57PM +0530, Amit Kapila wrote: > We can add more tests to validate the syntax, but my worry was to not > increase test timing by doing (parallel) vacuum. So maybe we can do > such syntax validation on empty tables or you have any better idea? Using empty tables for

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

2020-04-09 Thread Amit Kapila
On Thu, Apr 9, 2020 at 12:14 PM Michael Paquier wrote: > > On Thu, Apr 09, 2020 at 11:05:50AM +0530, Amit Kapila wrote: > > On Thu, Apr 9, 2020 at 7:07 AM Michael Paquier wrote: > >> I think that > >> this patch needs tests in sql/vacuum.sql. > > > > We already have one test that is testing an

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

2020-04-09 Thread Amit Kapila
On Thu, Apr 9, 2020 at 11:54 AM Masahiko Sawada wrote: > > On Thu, 9 Apr 2020 at 14:52, Amit Kapila wrote: > > > > > 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. > > ISTM we have

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

2020-04-09 Thread Michael Paquier
On Thu, Apr 09, 2020 at 11:05:50AM +0530, Amit Kapila wrote: > On Thu, Apr 9, 2020 at 7:07 AM Michael Paquier wrote: >> I think that >> this patch needs tests in sql/vacuum.sql. > > We already have one test that is testing an invalid combination of > PARALLEL and FULL option, not sure of adding

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

2020-04-09 Thread Masahiko Sawada
On Thu, 9 Apr 2020 at 14:52, Amit Kapila wrote: > > On Thu, Apr 9, 2020 at 12:09 AM Justin Pryzby 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 wrote: > > > > > > > > > > Thanks Justin for the patch. > > >

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

2020-04-08 Thread Amit Kapila
On Thu, Apr 9, 2020 at 12:09 AM Justin Pryzby 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 wrote: > > > > > > > Thanks Justin for the patch. > > > > Patch looks fine to me and it is fixing the issue. After

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

2020-04-08 Thread Amit Kapila
On Thu, Apr 9, 2020 at 7:07 AM Michael Paquier wrote: > > On Wed, Apr 08, 2020 at 01:38:54PM -0500, Justin Pryzby wrote: > > I think the behavior is correct, but the error message could be improved, > > like: > > |ERROR: cannot specify FULL with PARALLEL jobs > > or similar. > > Perhaps "cannot

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

2020-04-08 Thread Michael Paquier
On Wed, Apr 08, 2020 at 01:38:54PM -0500, Justin Pryzby wrote: > I think the behavior is correct, but the error message could be improved, > like: > |ERROR: cannot specify FULL with PARALLEL jobs > or similar. Perhaps "cannot use FULL and PARALLEL options together"? I think that this patch

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

2020-04-08 Thread Justin Pryzby
On Thu, Apr 09, 2020 at 12:06:04AM +0530, Mahendra Singh Thalor wrote: > On Wed, 8 Apr 2020 at 22:11, Justin Pryzby wrote: > > > > On Wed, Apr 08, 2020 at 11:57:08AM -0400, Robert Haas wrote: > > > On Wed, Apr 8, 2020 at 10:25 AM Mahendra Singh Thalor > > > wrote: > > > > I think, Tushar point

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

2020-04-08 Thread Mahendra Singh Thalor
On Wed, 8 Apr 2020 at 22:11, Justin Pryzby wrote: > > On Wed, Apr 08, 2020 at 11:57:08AM -0400, Robert Haas wrote: > > On Wed, Apr 8, 2020 at 10:25 AM Mahendra Singh Thalor > > wrote: > > > I think, Tushar point is that either we should allow both > > > vacuum(parallel 0, full 1) and

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

2020-04-08 Thread Justin Pryzby
On Wed, Apr 08, 2020 at 11:57:08AM -0400, Robert Haas wrote: > On Wed, Apr 8, 2020 at 10:25 AM Mahendra Singh Thalor > wrote: > > I think, Tushar point is that either we should allow both > > vacuum(parallel 0, full 1) and vacuum(parallel 1, full 0) or in the > > both cases, we should through

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

2020-04-08 Thread Robert Haas
On Wed, Apr 8, 2020 at 10:25 AM Mahendra Singh Thalor wrote: > I think, Tushar point is that either we should allow both > vacuum(parallel 0, full 1) and vacuum(parallel 1, full 0) or in the > both cases, we should through error. Oh, yeah, good point. Somebody must not've been careful enough

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

2020-04-08 Thread Mahendra Singh Thalor
On Wed, 8 Apr 2020 at 17:59, Robert Haas wrote: > > On Wed, Apr 8, 2020 at 8:22 AM tushar wrote: > > I just came across this scenario where - vaccum o/p with (full 1, > > parallel 0) option not working > > > > --working > > > > postgres=# vacuum (parallel 1, full 0 ) foo; > > VACUUM > >

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

2020-04-08 Thread Robert Haas
On Wed, Apr 8, 2020 at 8:22 AM tushar wrote: > I just came across this scenario where - vaccum o/p with (full 1, > parallel 0) option not working > > --working > > postgres=# vacuum (parallel 1, full 0 ) foo; > VACUUM > postgres=# > > --Not working > > postgres=# vacuum (full 1, parallel 0 )