Re: Vacuum o/p with (full 1, parallel 0) option throwing an error - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Vacuum o/p with (full 1, parallel 0) option throwing an error
Date
Msg-id 20200414022242.GG1492@paquier.xyz
Whole thread Raw
In response to Re: Vacuum o/p with (full 1, parallel 0) option throwing an error  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Vacuum o/p with (full 1, parallel 0) option throwing an error
List pgsql-hackers
On Mon, Apr 13, 2020 at 05:55:43PM +0530, Amit Kapila wrote:
> On Mon, Apr 13, 2020 at 4:23 PM Masahiko Sawada
> <masahiko.sawada@2ndquadrant.com> 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 integer value passed to the selected
> option.".  However, we can consider changing it if others also think
> the proposed text or something like that is better than current text.

FWIW, the current formulation in the docs looked fine to me.

> Yeah, something on these lines would be a good idea. Note that, we are
> already planning to slightly change this particular sentence in
> another patch [1].
>
> [1] - https://www.postgresql.org/message-id/20200322021801.GB2563%40telsasoft.com

Makes sense.  I have two comments.

         ereport(ERROR,
                 (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                 errmsg("cannot specify both FULL and PARALLEL options")));
+                 errmsg("VACUUM FULL cannot be performed in parallel")));
Better to avoid a full sentence here [1]?  This should be a "cannot do
foo" errror.

-VACUUM (PARALLEL 1) tmp; -- disables parallel vacuum option
+VACUUM (PARALLEL 1) tmp; -- parallel vacuum disabled for temp tables
 WARNING:  disabling parallel option of vacuum on "tmp" --- cannot  vacuum temporary tables in parallel
+VACUUM (PARALLEL 0, FULL TRUE) tmp; -- can specify parallel disabled (even though that's implied by FULL)

To fully close the gap in the tests, I would also add a test for
(PARALLEL 1, FULL false) where FULL directly specified, even if that
sounds like a nit.  That's fine to test even on a temporary table.

[1]: https://www.postgresql.org/docs/devel/error-style-guide.html
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: relcache leak warnings vs. errors
Next
From: "Lin, Cuiping"
Date:
Subject: Should program exit, When close() failed for O_RDONLY mode