Re: Move PGdata to a different drive

From: Yaroslav Tykhiy <yar(at)barnet(dot)com(dot)au>
To:
Cc: Jennifer Trey <jennifer(dot)trey(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Move PGdata to a different drive
Date: 2009-06-09 02:38:05
Message-ID: 4A2DCB0D.9030603@barnet.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

David Fetter wrote:
> On Thu, Jun 04, 2009 at 11:11:29AM -0400, Bruce Momjian wrote:
>> Jennifer Trey wrote:
>>> Hi,
>>> What file should I be working with?
>> Just shut down the server and move the directory whever you want and
>> restart the server. There are no file contents that need changing.
>> Of course should adjust your scripts or PGDATA environment variable.
>
> Another way to do this is to mount the drive at the place where PGDATA
> used to be. The down side of this approach is that it only works if
> you want your PGDATA at the root of that new drive.

And of course one can create a safety symlink to the new location of
PGDATA from the old location just in case, e.g., if one suspects
hidden references to PGDATA location in home-made scripts etc. Of
course, that had better be straightened out sooner than later and the
safety symlink removed for the sake of clarity, but when you need to
get everything rolling *ASAP*, temporary symlinks can be helpful.

Yar

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lizzy M 2009-06-09 07:36:24 Can postgresql store its data on raw device now?
Previous Message Craig Ringer 2009-06-09 00:31:46 Re: Why lots of temp schemas are being created