Re: Weird behaviour with ALTER TABLE ... SET TABLESPACE ... statement

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Guillaume Lelarge <guillaume(at)lelarge(dot)info>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Weird behaviour with ALTER TABLE ... SET TABLESPACE ... statement
Date: 2008-10-06 12:23:19
Message-ID: 18556.1223295799@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-10-06 12:28:26 Re: About postgresql8.3.3 build in MS VS2005
Previous Message Tom Lane 2008-10-06 12:02:35 Re: pgsql: Add relation fork support to pg_relation_size() function.