Re: Customising pg directories

From: Raghavendra <raghavendra(dot)rao(at)enterprisedb(dot)com>
To: Ben Carbery <ben(dot)carbery(at)gmail(dot)com>
Cc: postgresql Forums <pgsql-general(at)postgresql(dot)org>
Subject: Re: Customising pg directories
Date: 2012-06-28 08:38:20
Message-ID: CA+h6AhjJyHNL87cXtq=+y2gQf8R+eBjP9ZnX+J-ZH-tSqEtvOA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jun 28, 2012 at 1:20 PM, Ben Carbery <ben(dot)carbery(at)gmail(dot)com> wrote:

> I am building a new server with a separate partition for data and
> xlogs. What is the correct way to do this?
>
> Can I create a symlink from /var/lib/pgsql/9.1/data -> /pg_data (and
> then a symlink in /pgdata for xlogs-> /pg_xlog)
> Or do I have to modify $PGDATA in the init script?
>
> This is all after installing packages but prior to 'service
> postgresql-91 initdb'
>
> cheers
>
>
initdb --pgdata <datadirectory> --xlogdir <pg_xlog location>, is the
command which suit's your requirement.

This command will take care of creating symblinks as well.

---
Regards,
Raghavendra
EnterpriseDB Corporation
Blog: http://raghavt.blogspot.com/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marc Mamin 2012-06-28 10:00:30 function lookup using a "real" function call
Previous Message Albe Laurenz 2012-06-28 07:55:48 Re: log_min_duration_statement modification for non superusers?