Re: [Proposal] Allow users to specify multiple tables in VACUUM commands

Nathan Bossart <bossartn@amazon.com>

From: "Bossart, Nathan" <bossartn@amazon.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>, Masahiko Sawada <sawada.mshk@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-05-19T03:55:01Z
Lists: pgsql-hackers

Attachments

On 5/18/17, 8:26 PM, "Michael Paquier" <michael.paquier@gmail.com> wrote:
> +VACUUM vactst (i);
> Looking at the tests of v5, I think that you should as well add a test
> that lists multiple relations with one or more relations listing a
> column list for a VACUUM query, without ANALYZE specified in the
> options as the parsings of VacuumStmt and AnalyzeStmt are two
> different code paths, giving something like that:
> VACUUM (FREEZE) rel1, rel2(col1,col2); --error

Agreed, this seems like a good test case.  I’ve added it in v6 of the patch, which is attached.

Nathan

Commits

  1. Allow multiple tables to be specified in one VACUUM or ANALYZE command.

  2. Give a better error for duplicate entries in VACUUM/ANALYZE column list.

  3. Reject ANALYZE commands during VACUUM FULL or another ANALYZE.