Re: alter table set tablespace - Mailing list pgsql-general

From Jeff Davis
Subject Re: alter table set tablespace
Date
Msg-id 1280265547.8505.60.camel@jdavis-ux.asterdata.local
Whole thread Raw
In response to alter table set tablespace  ("Leif Gunnar Erlandsen" <leif@lako.no>)
Responses Re: alter table set tablespace  (ChronicDB Community Team <community@chronicdb.com>)
List pgsql-general
On Tue, 2010-07-27 at 20:38 +0000, Leif Gunnar Erlandsen wrote:
> I want to move one table from one disk to another.
>
> In order to do this I wanted to create a new tablespace on the new disks and
> issue the command alter table tablename set tablespace tablespacename;
>
> The question is, will this in any way affect the database which is in heavily
> use?
>
> The table in question is the largest one approximately 90GB.

Yes, it will have a performance impact. The table will be locked while
it's being moved to the new tablespace, preventing both reads and writes
until the operation is complete.

Regards,
    Jeff Davis


pgsql-general by date:

Previous
From: "Leif Gunnar Erlandsen"
Date:
Subject: alter table set tablespace
Next
From: "Jerry Richards"
Date:
Subject: Must be owner of function