Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly
Justin Pryzby <pryzby@telsasoft.com>
From: Justin Pryzby <pryzby@telsasoft.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Alexey Kondratov <a.kondratov@postgrespro.ru>, Alvaro Herrera <alvherre@2ndquadrant.com>, Masahiko Sawada <masahiko.sawada@2ndquadrant.com>, Steve Singer <steve@ssinger.info>, pgsql-hackers@lists.postgresql.org, 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-12-03T04:30:08Z
Lists: pgsql-hackers
Attachments
- v31-0003-Refactor-and-reuse-set_rel_tablespace.patch (text/x-diff)
On Thu, Dec 03, 2020 at 10:19:43AM +0900, Michael Paquier wrote: > OK, this one is now committed. As of this thread, I think that we are > going to need to do a bit more once we add options that are not just > booleans for both commands (the grammar rules do not need to be > changed now): > - Have a ReindexParams, similarly to VacuumParams except that we store > the results of the parsing in a single place. With the current HEAD, > I did not see yet the point in doing so because we just need an > integer that maps to a bitmask made of ReindexOption. > - The part related to ReindexStmt in utility.c is getting more and > more complicated, so we could move most of the execution into > indexcmds.c with some sort of ExecReindex() doing the option parsing > job, and go to the correct code path depending on the object type > dealt with. Good idea. I think you mean like this. I don't know where to put the struct. I thought maybe the lowlevel, integer options should live in the struct, in addition to bools, but it's not important. -- Justin
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