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

From: Alexey Kondratov <a(dot)kondratov(at)postgrespro(dot)ru>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, 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-09-01 10:36:38
Message-ID: ef3c2fe1c06271a4bb3d4e3c2fc83727@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-09-01 13:12, Justin Pryzby wrote:
> This patch seems to be missing a call to RelationAssumeNewRelfilenode()
> in
> reindex_index().
>
> That's maybe the related to the cause of the crashes I pointed out
> earlier this
> year.
>
> Alexey's v4 patch changed RelationSetNewRelfilenode() to accept a
> tablespace
> parameter, but Michael seemed to object to that. However that seems
> cleaner
> and ~30 line shorter.
>
> Michael, would you comment on that ? The v4 patch and your comments
> are here.
> https://www.postgresql.org/message-id/attachment/105574/v4-0001-Allow-REINDEX-and-REINDEX-CONCURRENTLY-to-change-tablespace.patch
> https://www.postgresql.org/message-id/20191127035416.GG5435%40paquier.xyz
>

Actually, the last time we discussed this point I only got the gut
feeling that this is a subtle place and it is very easy to break things
with these changes. However, it isn't clear for me how exactly. That
way, I'd be glad if Michael could reword his explanation, so it'd more
clear for me as well.

BTW, I've started doing a review of the last patch set yesterday and
will try to post some comments later.

Regards
--
Alexey Kondratov

Postgres Professional https://www.postgrespro.com
Russian Postgres Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message gkokolatos 2020-09-01 10:36:51 Re: Reloptions for table access methods
Previous Message Georgios 2020-09-01 10:27:31 Re: Include access method in listTables output