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>,
"David G. Johnston" <david.g.johnston@gmail.com>
Cc: 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-31T01:52:13Z
Lists: pgsql-hackers
Attachments
- dedupe_vacuum_relations_v2.patch (application/octet-stream) patch v2
- vacuum_multiple_tables_v11.patch (application/octet-stream) patch v11
On 8/30/17, 5:37 PM, "Michael Paquier" <michael.paquier@gmail.com> wrote:
> +VacuumRelation *
> +makeVacuumRelation(RangeVar *relation, List *va_cols, Oid oid)
> +{
> + VacuumRelation *vacrel = makeNode(VacuumRelation);
> + vacrel->relation = relation;
> + vacrel->va_cols = va_cols;
> + vacrel->oid = oid;
> + return vacrel;
> +}
> Perhaps in makefuncs.c instead of vacuum.c? That's usually the place
> used for node constructions like that.
This function is moved in v11.
On 8/30/17, 6:52 PM, "Michael Paquier" <michael.paquier@gmail.com> wrote:
> On Thu, Aug 31, 2017 at 8:35 AM, David G. Johnston
> <david.g.johnston@gmail.com> wrote:
>> 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 [, ... ] ) ]
>
> Yes, splitting things would be nice with the column list. I need more coffee.
I've made this change in v11 as well.
v2 of the de-duplication patch seems to still apply cleanly, so I haven't
made any further changes to it.
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