Allow multiple tables to be specified in one VACUUM or ANALYZE command.
Tom Lane <tgl@sss.pgh.pa.us>
Allow multiple tables to be specified in one VACUUM or ANALYZE command. Not much to say about this; does what it says on the tin. However, formerly, if there was a column list then the ANALYZE action was implied; now it must be specified, or you get an error. This is because it would otherwise be a bit unclear what the user meant if some tables have column lists and some don't. Nathan Bossart, reviewed by Michael Paquier and Masahiko Sawada, with some editorialization by me Discussion: https://postgr.es/m/E061A8E3-5E3D-494D-94F0-E8A9B312BBFC@amazon.com
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/analyze.sgml | modified | +10 −4 |
| doc/src/sgml/ref/vacuum.sgml | modified | +24 −12 |
| src/backend/commands/vacuum.c | modified | +158 −78 |
| src/backend/nodes/copyfuncs.c | modified | +14 −0 |
| src/backend/nodes/equalfuncs.c | modified | +12 −0 |
| src/backend/nodes/makefuncs.c | modified | +15 −0 |
| src/backend/parser/gram.y | modified | +27 −44 |
| src/backend/postmaster/autovacuum.c | modified | +10 −10 |
| src/include/commands/vacuum.h | modified | +1 −2 |
| src/include/nodes/makefuncs.h | modified | +2 −0 |
| src/include/nodes/nodes.h | modified | +1 −0 |
| src/include/nodes/parsenodes.h | modified | +18 −4 |
| src/test/regress/expected/vacuum.out | modified | +21 −2 |
| src/test/regress/sql/vacuum.sql | modified | +16 −3 |
Documentation touched
Discussion
- [Proposal] Allow users to specify multiple tables in VACUUM commands 119 messages · 2017-05-10 → 2017-10-04