Re: [Proposal] Allow users to specify multiple tables in VACUUM commands
David G. Johnston <david.g.johnston@gmail.com>
From: "David G. Johnston" <david.g.johnston@gmail.com>
To: "Bossart, Nathan" <bossartn@amazon.com>
Cc: Michael Paquier <michael.paquier@gmail.com>,
Robert Haas <robertmhaas@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Tom Lane <tgl@sss.pgh.pa.us>, Masahiko Sawada <sawada.mshk@gmail.com>
Date: 2017-08-30T23:35:10Z
Lists: pgsql-hackers
On Wed, Aug 30, 2017 at 4:08 PM, Bossart, Nathan <bossartn@amazon.com>
wrote:
> On 8/30/17, 5:37 PM, "Michael Paquier" <michael.paquier@gmail.com> wrote:
> > Yeah... Each approach has its cost and its advantages. It may be
> > better to wait for more opinions, no many people have complained yet
> > that for example a list of columns using twice the same one fails.
>
> Sounds good to me.
>
> > +VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] [ <replaceable
> > class="PARAMETER">table_name</replaceable> ] [, ...]
> > I just noticed that... But regarding the docs, I think that you have
> > misplaced the position of "[, ...]", which should be inside the
> > table_name portion in the case of what I quote here, no?
>
> I think that's what I had initially, but it was changed somewhere along
> the line. It is a little more complicated for the versions that accept
> column lists.
>
> VACUUM ... ANALYZE [ [ table_name [ (column_name [, ...] ) ] ] [, ...] ]
>
> ISTM that we need the extra brackets here to clarify that the table and
> column list combination is what can be provided in a list. Does that
> make sense? Or do you think we can omit the outermost brackets here?
>
Inspired by the syntax documentation for EXPLAIN:
VACUUM [ ( option [, ...] ) ] [ table_def [, ...] ]
where option can be one of:
FULL
FREEZE
VERBOSE
DISABLE_PAGE_SKIPPING
and where table_def is:
table_name [ ( column_name [, ... ] ) ]
David J.
Commits
-
Allow multiple tables to be specified in one VACUUM or ANALYZE command.
- 11d8d72c27a6 11.0 landed
-
Give a better error for duplicate entries in VACUUM/ANALYZE column list.
- ea31541f5648 9.6.6 landed
- e56facd8b300 9.2.24 landed
- b572b435ca67 9.4.15 landed
- a2b1eb23496e 10.0 landed
- a09d8be7ddaf 9.3.20 landed
- 71480501057f 11.0 landed
- 122289a66b92 9.5.10 landed
-
Reject ANALYZE commands during VACUUM FULL or another ANALYZE.
- e415b469b33b 9.5.0 cited