Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id EDE769FB5E4 for ; Sat, 23 Jun 2007 01:29:50 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 34409-06 for ; Sat, 23 Jun 2007 01:29:48 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from vms048pub.verizon.net (vms048pub.verizon.net [206.46.252.48]) by postgresql.org (Postfix) with ESMTP id 1ED5E9FB5D8 for ; Sat, 23 Jun 2007 01:29:48 -0300 (ADT) Received: from new-host.home ([71.179.23.138]) by vms048.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JK2006TQN5NF883@vms048.mailsrvcs.net> for pgsql-admin@postgresql.org; Fri, 22 Jun 2007 23:29:47 -0500 (CDT) Date: Sat, 23 Jun 2007 00:29:42 -0400 From: Robert Treat Subject: Re: How to move a tablespace? In-reply-to: <1d219a6f0706221114t25ddf96djf62297a8f1428cc2@mail.gmail.com> To: pgsql-admin@postgresql.org Cc: "Chris Hoover" Message-id: <200706230029.42578.xzilla@users.sourceforge.net> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-15 Content-transfer-encoding: 7bit Content-disposition: inline References: <1d219a6f0706221114t25ddf96djf62297a8f1428cc2@mail.gmail.com> User-Agent: KMail/1.9.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/251 X-Sequence-Number: 25919 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