pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Treat <xzilla@users.sourceforge.net>
To: pgsql-admin@postgresql.org
Cc: Chris Hoover <revoohc@gmail.com>
Subject: Re: How to move a tablespace?
Date: Sat, 23 Jun 2007 00:29:42 -0400
Message-ID: <200706230029.42578.xzilla@users.sourceforge.net> (raw)
In-Reply-To: <1d219a6f0706221114t25ddf96djf62297a8f1428cc2@mail.gmail.com>
References: <1d219a6f0706221114t25ddf96djf62297a8f1428cc2@mail.gmail.com>

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



view thread (3+ messages)  latest in thread

Message-ID: <200706230029.42578.xzilla@users.sourceforge.net>
Permalink:  ../200706230029.42578.xzilla@users.sourceforge.net/
Also on:    postgresql.org/message-id/200706230029.42578.xzilla@users.sourceforge.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: xzilla@users.sourceforge.net, revoohc@gmail.com
  Subject: Re: How to move a tablespace?
  In-Reply-To: <200706230029.42578.xzilla@users.sourceforge.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox