Re: How to move a tablespace? - Mailing list pgsql-admin

From Robert Treat
Subject Re: How to move a tablespace?
Date
Msg-id 200706230029.42578.xzilla@users.sourceforge.net
Whole thread Raw
In response to How to move a tablespace?  ("Chris Hoover" <revoohc@gmail.com>)
Responses Re: How to move a tablespace?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
On Friday 22 June 2007 14:14, Chris Hoover wrote:
> How do you correctly move a tablespace?
>
> I am thinking this would be the process:
> 1.  Cleanly shutdown Postgres
> 2.  Move tablespace directory and all contents to new location
> 3.  Create a symlink from the new location back to the old location
> 4.  Restart Postgres
>
> Would that be correct?  Or is there a better way.
>

ISTM it would be safer to just create a new tablspace within the db and then
move the objects in that tablespace over.

On a side note, this is one reason to make tablespaces on clean mount points,
so that you can swap the disk systems out underneath, but maintain the same
mountpoint, and not let the db care about the difference.

--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL

pgsql-admin by date:

Previous
From: "Chris Hoover"
Date:
Subject: How to move a tablespace?
Next
From: Tom Lane
Date:
Subject: Re: How to move a tablespace?