Re: Move PGdata to a different drive

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Move PGdata to a different drive
Date: 2009-06-09 12:50:48
Message-ID: h0llr8$90o$9@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2009-06-05, David Fetter <david(at)fetter(dot)org> 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.

linux (2.4 and later) can mount paths using --bind

That is, you can use mount like a symlink (except unlike a symlink the mounted
directories are still there after chroot)

>
> Cheers,
> David.
> --
> David Fetter <david(at)fetter(dot)org> http://fetter.org/
> Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
> Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
>
> Remember to vote!
> Consider donating to Postgres: http://www.postgresql.org/about/donate
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Grzegorz Jaśkiewicz 2009-06-09 14:11:51 Re: postgres getting slow under heavy load though autivacuum is enabled
Previous Message Jasen Betts 2009-06-09 12:39:59 Re: limit table to one row