Re: Weird behaviour with ALTER TABLE ... SET TABLESPACE ... statement - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Weird behaviour with ALTER TABLE ... SET TABLESPACE ... statement
Date
Msg-id 48EA65D7.8020507@enterprisedb.com
Whole thread Raw
In response to Re: Weird behaviour with ALTER TABLE ... SET TABLESPACE ... statement  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
>> Yeah, seems like we need to allocate a new relfilenode in the new 
>> tablespace.
> 
> I looked into tablecmds.c and verified that ATExecSetTableSpace doesn't
> worry about selecting a new relfilenode.  I'm also noticing a number of
> permissions-type checks that seem like they'd better be done in
> ATPrepSetTableSpace, because we don't go through ATExecSetTableSpace
> if the table requires rewriting for other reasons.  All in all this
> code seems to need more careful review than it's gotten so far.
> You want to do it?

I'll give it a shot.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Decibel!
Date:
Subject: Re: Foreign key constraint for array-field?
Next
From: "Robert Haas"
Date:
Subject: Re: Common Table Expressions applied; some issues remain