Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly - Mailing list pgsql-hackers

From Alexey Kondratov
Subject Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly
Date
Msg-id 03f88f70618ce73e75837b6125a143f7@postgrespro.ru
Whole thread Raw
In response to Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly  (Alexey Kondratov <a.kondratov@postgrespro.ru>)
List pgsql-hackers
On 2021-01-20 21:08, Alexey Kondratov wrote:
> 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?
> 

Ugh, forgot to attach the patches. Here they are.

-- 
Alexey
Attachment

pgsql-hackers by date:

Previous
From: Alexey Kondratov
Date:
Subject: Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly
Next
From: Alvaro Herrera
Date:
Subject: Re: Jsonpath ** vs lax mode