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

Nathan Bossart <bossartn@amazon.com>

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

Attachments

Thanks all for your feedback.  I’ve attached v5 of the patch.

Changes:
 - fixed implicit declaration of ‘attnameAttNum’ in vacuum.c
 - specified relations and columns are de-duplicated
 - users are now forced to specify ANALYZE if a column list is given
 - added to VACUUM regression test
 - rebased with master

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.