On Mon, Feb 01, 2021 at 06:28:57PM +0300, Alexey Kondratov wrote: > On 2021-01-30 05:23, Michael Paquier wrote: > > This makes me really wonder if we would not be better to restrict this > > operation for partitioned relation as part of REINDEX as a first step. > > Another thing, mentioned upthread, is that we could do this part of > > the switch at the last transaction, or we could silently *not* do the > > switch for partitioned indexes in the flow of REINDEX, letting users > > handle that with an extra ALTER TABLE SET TABLESPACE once REINDEX has > > finished on all the partitions, cascading the command only on the > > partitioned relation of a tree.
I suggest that it'd be un-intuitive to skip partitioned rels , silently requiring a user to also run "ALTER .. SET TABLESPACE". But I think it'd be okay if REINDEX(TABLESPACE) didn't support partitioned tables/indexes at first. I think it'd be better as an ERROR. -- Justin