Skip site navigation (1) Skip section navigation (2)

Re: [PATCHES] ALTER TABLE ... SET TABLESPACE

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: swm(at)linuxworld(dot)com(dot)au
Cc: pgsql-patches(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCHES] ALTER TABLE ... SET TABLESPACE
Date: 2004-06-20 12:58:59
Message-ID: 20040620.215859.71086786.t-ishii@sra.co.jp (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
> > Attached is a patch implementing this functionality.
> > 
> > I've modified make_new_heap() as well as swap_relfilenodes() to not assume
> > that tablespaces remain the same from old to new heap. I thought it better
> > to go down this road than introduce a lot of duplicate code.
> 
> I have tried your patches and it works great. Thanks.
> 
> One thing I noticed was if I change tablespace for a table having
> indexes, they are left in the old tablespace and the table itself was
> moved to the new tablespace. I regard this is a good thing since I
> could assign different table spaces for table and indexes.
> It would be even better to assign different tablespaces for each
> index.

Hm. It seems there's a problem with tablespaces. What I did was:

pgbench -i test
alter table accounts set tablespace mydb2;
\d accounts

backend crashes by signal 11...
--
Tatsuo Ishii

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2004-06-20 13:21:52
Subject: Re: batch write of dirty buffers
Previous:From: Tatsuo IshiiDate: 2004-06-20 12:39:48
Subject: Re: [PATCHES] ALTER TABLE ... SET TABLESPACE

pgsql-patches by date

Next:From: Magnus HaganderDate: 2004-06-20 15:26:56
Subject: Re: pg_ctl service integration for WIN32
Previous:From: Tatsuo IshiiDate: 2004-06-20 12:39:48
Subject: Re: [PATCHES] ALTER TABLE ... SET TABLESPACE

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group