agora inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feedFrom: Alexey Kondratov <a.kondratov@postgrespro.ru>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Masahiko Sawada <masahiko.sawada@2ndquadrant.com>
Cc: Steve Singer <steve@ssinger.info>
Cc: pgsql-hackers@lists.postgresql.org, Robert Haas <robertmhaas@gmail.com>
Cc: Alexander Korotkov <a.korotkov@postgrespro.ru>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Jose Luis Tallon <jltallon@adv-solutions.net>
Subject: Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly
Date: Wed, 20 Jan 2021 21:08:11 +0300
Message-ID: <7f51f09d2dd1c92981f898e0a7b2f187@postgrespro.ru> (raw)
In-Reply-To: <20210120155450.GA9584@alvherre.pgsql>
References: <20210120155450.GA9584@alvherre.pgsql>
On 2021-01-20 18:54, Alvaro Herrera wrote:
> On 2021-Jan-20, Alvaro Herrera wrote:
>
>> On 2021-Jan-20, Michael Paquier wrote:
>>
>> > +/*
>> > + * This is mostly duplicating ATExecSetTableSpaceNoStorage,
>> > + * which should maybe be factored out to a library function.
>> > + */
>> > Wouldn't it be better to do first the refactoring of 0002 and then
>> > 0001 so as REINDEX can use the new routine, instead of putting that
>> > into a comment?
>>
>> I think merging 0001 and 0002 into a single commit is a reasonable
>> approach.
>
> ... except it doesn't make a lot of sense to have set_rel_tablespace in
> either indexcmds.c or index.c. I think tablecmds.c is a better place
> for it. (I would have thought catalog/storage.c, but that one's not
> the
> right abstraction level it seems.)
>
I did a refactoring of ATExecSetTableSpaceNoStorage() in the 0001. New
function SetRelTablesapce() is placed into the tablecmds.c. Following
0002 gets use of it. Is it close to what you and Michael suggested?
>
> But surely ATExecSetTableSpaceNoStorage should be using this new
> routine. (I first thought 0002 was doing that, since that commit is
> calling itself a "refactoring", but now that I look closer, it's not.)
>
Yeah, this 'refactoring' was initially referring to refactoring of what
Justin added to one of the previous 0001. And it was meant to be merged
with 0001, once agreed, but we got distracted by other stuff.
I have not yet addressed Michael's concerns regarding reindex of
partitions. I am going to look closer on it tomorrow.
Regards
--
Alexey Kondratov
Postgres Professional https://www.postgrespro.com
Russian Postgres Company
view thread (154+ messages) latest in thread
Message-ID: <7f51f09d2dd1c92981f898e0a7b2f187@postgrespro.ru>
Permalink: ../7f51f09d2dd1c92981f898e0a7b2f187@postgrespro.ru/
Also on: postgresql.org/message-id/7f51f09d2dd1c92981f898e0a7b2f187@postgrespro.ru
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: a.kondratov@postgrespro.ru, alvherre@alvh.no-ip.org, michael@paquier.xyz, pryzby@telsasoft.com, peter.eisentraut@enterprisedb.com, masahiko.sawada@2ndquadrant.com, steve@ssinger.info, robertmhaas@gmail.com, a.korotkov@postgrespro.ru, sawada.mshk@gmail.com, jltallon@adv-solutions.net
Subject: Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly
In-Reply-To: <7f51f09d2dd1c92981f898e0a7b2f187@postgrespro.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox