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: Masahiko Sawada <sawada.mshk@gmail.com>,
"David G. Johnston" <david.g.johnston@gmail.com>,
Robert Haas <robertmhaas@gmail.com>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Tom Lane <tgl@sss.pgh.pa.us>
Date: 2017-09-07T22:27:10Z
Lists: pgsql-hackers
Attachments
- error_on_duplicate_columns_in_analyze_v2.patch (application/octet-stream) patch v2
- vacuum_multiple_tables_v15.patch (application/octet-stream) patch v15
On 9/7/17, 2:33 AM, "Michael Paquier" <michael.paquier@gmail.com> wrote: > Using the patch checking for duplicate columns: > =# create table aa (a int); > CREATE TABLE > =# vacuum ANALYZE aa(z, z); > ERROR: 0A000: column lists cannot have duplicate entries > HINT: the column list specified for relation "aa" contains duplicates > LOCATION: check_column_lists, vacuum.c:619 > Shouldn't the priority be given to undefined columns instead of > duplicates? You may want to add a test for that as well. I agree. I've fixed this and added a couple relevant tests cases in v2. I've also attached a v15 of the main patch. In check_columns_exist(), there was a 'return' that should be a 'continue'. This caused us to skip the column existence checks for column lists defined after a table with no column list. Nathan
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