Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id AA4F22E003C for ; Mon, 7 Apr 2008 18:45:33 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 24204-03 for ; Mon, 7 Apr 2008 18:45:30 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by developer.postgresql.org (Postfix) with ESMTP id 7303E2E0035 for ; Mon, 7 Apr 2008 18:45:30 -0300 (ADT) Received: from localhost (or-69-34-217-90.sta.embarqhsd.net [69.34.217.90]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id m37Lk5r6029747 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 7 Apr 2008 14:46:05 -0700 Date: Mon, 7 Apr 2008 14:48:22 -0700 From: "Joshua D. Drake" To: Grzegorz Dostatni Cc: pgsql-admin@postgresql.org Subject: Re: moving tablespaces Message-ID: <20080407144822.21c8bcbb@commandprompt.com> In-Reply-To: <295750.79484.qm@web30402.mail.mud.yahoo.com> References: <295750.79484.qm@web30402.mail.mud.yahoo.com> Organization: Command Prompt, Inc. X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.0; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Mon, 07 Apr 2008 14:46:06 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/59 X-Sequence-Number: 28823 On Mon, 7 Apr 2008 14:15:02 -0700 (PDT) Grzegorz Dostatni wrote: > Hello. > > I'm running postgresql 8.3.1 on Solaris 10. > > I made a mistake when originally setting up the > database directory (which includes tablespaces). I > have moved it to a new location, and I have setup a > symbolic link that allows the db to find the > tablespaces. What I'm wondering about is how do I make > the change pernament in the database (ie. without > using symbolic links)? > > What's the safe way to do that? > > Is moving the symbolic links from pg_tblspc area > sufficient? DB needs to be shutdown for that. Will > that update the pg_tablespace table within the > database automatically? Create a new tablespace and move the objects to it (alter table tablespace ....). However this will be an exclusive lock for each object as the task is performed. Sincerely, Joshua D. Drake > > Thanks, > > Greg > > > ____________________________________________________________________________________ > You rock. That's why Blockbuster's offering you one month of > Blockbuster Total Access, No Cost. > http://tc.deals.yahoo.com/tc/blockbuster/text5.com > -- The PostgreSQL Company since 1997: http://www.commandprompt.com/ PostgreSQL Community Conference: http://www.postgresqlconference.org/ United States PostgreSQL Association: http://www.postgresql.us/ Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate