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

From Guillaume Lelarge
Subject Re: Weird behaviour with ALTER TABLE ... SET TABLESPACE ... statement
Date
Msg-id 48EA0494.4020606@lelarge.info
Whole thread Raw
In response to Re: Weird behaviour with ALTER TABLE ... SET TABLESPACE ... statement  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Weird behaviour with ALTER TABLE ... SET TABLESPACE ... statement
List pgsql-hackers
Tom Lane a écrit :
> Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
>> The trivial fix is to just force a checkpoint in ALTER TABLE SET 
>> TABLESPACE. Can we do better than that? Perhaps only force a checkpoint 
>> when we find that the file already exists.
> 
> If ALTER TABLE SET TABLESPACE is assuming that it can always use the
> same relfilenode number in the new space as in the old, it's just plain
> broken.  We need to fix that assumption.
> 

Do you mean the backend should change the relfilenode number whenever we
use the ALTER TABLE SET TABLESPACE ? I can't think of a way to get twice
the same relfilenode.

Perhaps a better question would be : how the next relfilenode is computed?


-- 
Guillaume.http://www.postgresqlfr.orghttp://dalibo.com


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: About postgresql8.3.3 build in MS VS2005
Next
From: Heikki Linnakangas
Date:
Subject: Re: Weird behaviour with ALTER TABLE ... SET TABLESPACE ... statement