Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Alexey Kondratov <a(dot)kondratov(at)postgrespro(dot)ru>, Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com>, Steve Singer <steve(at)ssinger(dot)info>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Jose Luis Tallon <jltallon(at)adv-solutions(dot)net>
Subject: Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly
Date: 2020-08-11 07:09:22
Message-ID: 20200811070922.GP20473@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 11, 2020 at 02:39:45PM +0900, Michael Paquier wrote:
> so I have removed that part, and applied the patch.

Thank you

> > The rest of your patch looks fine. In my mind, REINDEX(CONCURRENTLY) was the
> > "new way" to write things, and it's what's easy to support, so I think I didn't
> > put special effort into making tab completion itself complete.
>
> The grammar that has been committed was the one that for the most
> support, so we need to live with that. I wonder if we should simplify
> ReindexStmt and move the "concurrent" flag to be under "options", but
> that may not be worth the time spent on as long as we don't have
> CONCURRENTLY part of the parenthesized grammar.

I think it's kind of a good idea, since the next patch does exactly that
(parenthesize (CONCURRENTLY)).

I included that as a new 0002, but it doesn't save anything though, so maybe
it's not a win.

$ git diff --stat
src/backend/commands/indexcmds.c | 20 +++++++++++---------
src/backend/nodes/copyfuncs.c | 1 -
src/backend/nodes/equalfuncs.c | 1 -
src/backend/parser/gram.y | 16 ++++++++++++----
src/backend/tcop/utility.c | 6 +++---
src/include/nodes/parsenodes.h | 2 +-
6 files changed, 27 insertions(+), 19 deletions(-)

--
Justin

Attachment Content-Type Size
v22-0001-Change-REINDEX-CLUSTER-to-accept-an-option-list.patch text/x-diff 23.7 KB
v22-0002-Deprecate-ReindexStmt-concurrent.patch text/x-diff 8.5 KB
v22-0003-Allow-REINDEX-to-change-tablespace.patch text/x-diff 27.9 KB
v22-0004-Allow-CLUSTER-and-VACUUM-FULL-to-change-tablespa.patch text/x-diff 23.5 KB
v22-0005-Implement-vacuum-full-cluster-INDEX_TABLESPACE-t.patch text/x-diff 19.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Sharma 2020-08-11 07:38:48 Re: recovering from "found xmin ... from before relfrozenxid ..."
Previous Message Masahiko Sawada 2020-08-11 06:55:11 Re: massive FPI_FOR_HINT load after promote