Re: How to move a tablespace?

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: pgsql-admin(at)postgresql(dot)org
Cc: "Chris Hoover" <revoohc(at)gmail(dot)com>
Subject: Re: How to move a tablespace?
Date: 2007-06-23 04:29:42
Message-ID: 200706230029.42578.xzilla@users.sourceforge.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2007-06-23 04:42:29 Re: How to move a tablespace?
Previous Message Chris Hoover 2007-06-22 18:14:43 How to move a tablespace?