Re: [PATCHES] ALTER TABLE ... SET TABLESPACE - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCHES] ALTER TABLE ... SET TABLESPACE
Date
Msg-id 22694.1087791348@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCHES] ALTER TABLE ... SET TABLESPACE  (Gavin Sherry <swm@linuxworld.com.au>)
List pgsql-hackers
Gavin Sherry <swm@linuxworld.com.au> writes:
> On Mon, 21 Jun 2004, Tatsuo Ishii wrote:
>> First of all I would like to ask you if you intend to leave indexes in
>> the old tables space or not.

> Yes, that is intentional.

There's a related issue: what about the table's TOAST table (if any)
and the index on same?

During CREATE TABLE, the toast table is assigned to the same tablespace
as the base table, as is its index.  I don't think this is wrong exactly
--- the fact that we separate data storage into main and toast tables is
an implementation detail that users shouldn't have to think about.

If you subscribe to that notion, then ALTER TABLE SET TABLESPACE had
better move the toast table and index too.  If you don't subscribe
to it, then ALTER TABLE SET TABLESPACE had better be able to move
toast tables, and the issue will have to be documented.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] ALTER TABLE ... SET TABLESPACE
Next
From: Bruce Momjian
Date:
Subject: Applying patches