From: Joshua D. Drake <jd@commandprompt.com>
To: Grzegorz Dostatni <dostatnig@yahoo.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: moving tablespaces
Date: Mon, 7 Apr 2008 14:48:22 -0700
Message-ID: <20080407144822.21c8bcbb@commandprompt.com> (raw)
In-Reply-To: <295750.79484.qm@web30402.mail.mud.yahoo.com>
References: <295750.79484.qm@web30402.mail.mud.yahoo.com>
On Mon, 7 Apr 2008 14:15:02 -0700 (PDT)
Grzegorz Dostatni <dostatnig@yahoo.com> 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 <foo>
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
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: jd@commandprompt.com, dostatnig@yahoo.com
Subject: Re: moving tablespaces
In-Reply-To: <20080407144822.21c8bcbb@commandprompt.com>
* 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