Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Alexey Kondratov <a.kondratov@postgrespro.ru>
Cc: Justin Pryzby <pryzby@telsasoft.com>, Masahiko Sawada <masahiko.sawada@2ndquadrant.com>, Steve Singer <steve@ssinger.info>, pgsql-hackers@lists.postgresql.org, Alvaro Herrera <alvherre@2ndquadrant.com>, Robert Haas <robertmhaas@gmail.com>, Alexander Korotkov <a.korotkov@postgrespro.ru>, Masahiko Sawada <sawada.mshk@gmail.com>, Jose Luis Tallon <jltallon@adv-solutions.net>
Date: 2020-04-01T06:03:34Z
Lists: pgsql-hackers
On Tue, Mar 31, 2020 at 01:56:07PM +0300, Alexey Kondratov wrote: > I am fine with allowing REINDEX (CONCURRENTLY), but then we will have to > support both syntaxes as we already do for VACUUM. Anyway, if we agree to > add parenthesized options to REINDEX/CLUSTER, then it should be done as a > separated patch before the current patch set. Last year for the patch for REINDEX CONCURRENTLY, we had the argument of supporting only the parenthesized grammar or not, and the choice has been made to use what we have now, as you mentioned upthread. I would honestly prefer that for now on we only add the parenthesized version of an option if something new is added to such utility commands (vacuum, analyze, reindex, etc.) as that's much more extensible from the point of view of the parser. And this, even if you need to rework things a bit more things around reindex_option_elem for the tablespace option proposed here. -- Michael
Commits
-
Add TABLESPACE option to REINDEX
- c5b286047cd6 14.0 landed
-
Refactor code in tablecmds.c to check and process tablespace moves
- 4c9c359d38ff 14.0 landed
-
Refactor option handling of CLUSTER, REINDEX and VACUUM
- a3dc926009be 14.0 landed
-
pg_dump: Don't use enums for defining bit mask values
- d2a2808eb444 14.0 landed
-
Refactor CLUSTER and REINDEX grammar to use DefElem for option lists
- b5913f612079 14.0 landed
-
Refactor parsing rules for option lists of EXPLAIN, VACUUM and ANALYZE
- 873ea9ee692e 14.0 landed
-
Improve tab completion of REINDEX in psql
- 1f75b454134c 14.0 landed
-
Fix possible crash during FATAL exit from reindexing.
- d12bdba77b0f 13.0 cited