From: Josh Berkus <josh@agliodbs.com>
To: pgsql-performance@postgresql.org
Subject: Re: moving tables
Date: Wed, 20 Jun 2012 17:28:38 -0700
Message-ID: <4FE26AB6.1060407@agliodbs.com> (raw)
In-Reply-To: <CF4C3D2E11EC45D59CE287E81AFCE3F5@BERNICE>
References: <CF4C3D2E11EC45D59CE287E81AFCE3F5@BERNICE>
On 6/20/12 3:27 PM, Midge Brown wrote:
> I need to move a postgres 9.0 database -- with tables, indexes, and wals associated with 16 tablespaces on 12 logical drives -- to an existing raid 10 drive in another volume on the same server. Once I get the data off the initial 12 drives they will be reconfigured, at which point I'll need to move everything from the 2nd volume to the aforementioned 12 logical drives on the first volume. This is being done both to free up the 2nd volume and to better utilize raid 10.
>
> I checked around and found a way to create sql statements to alter the public tablespaces and indexes, but I haven't found anything that provides information about moving the numerous associated config files, log files, etc.
>
> ANY comments, suggestions, or direction to existing documentation would be greatly appreciated.
1. back everything up.
2. create a bunch of directories on the RAID10 to match the existing
tablespaces (they won't be mounts, but Postgres doesn't care about that).
3. shut down postgres
4. copy all your files to the new directories
5. change your mount points which were in use by the old tablespaces to
symlinks which point at the new diretories
6. start postgres back up from the new location
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com
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-performance@postgresql.org
Cc: josh@agliodbs.com
Subject: Re: moving tables
In-Reply-To: <4FE26AB6.1060407@agliodbs.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