Skip site navigation (1) Skip section navigation (2)

Re: location for pgdata

From: Jason Earl <jason(dot)earl(at)simplot(dot)com>
To: julesa(at)arbodienst-limburg(dot)nl
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: location for pgdata
Date: 2002-01-10 15:02:44
Message-ID: 873d1ei6zv.fsf@npa01zz001.simplot.com (view raw or flat)
Thread:
Lists: pgsql-novice
"Jules Alberts" <julesa(at)arbodienst-limburg(dot)nl> writes:

> On 9 Jan 2002 at 10:11, Josh Berkus wrote:
> <snip>
> > 4 rules:
> > 1. The pgsql/data directory, as all pgsql/ directories, must belong to
> > the postgres user. 2. The database will grow, and the log file sizes
> > will fluctuate constantly.  So you want plenty of extra partition space.
> > 3. Nothing other than Postgres data and files should be in the data
> > directory to avoid overwriting important files. 4. You and anybody else
> > who uses the system should be able to identify the Postgres directory
> > easily.
> > 
> > I fulfill the above by putting the data in /usr/local/pgsql/data, but
> > then putting that directory on its own partition.  You could do it by
> > putting it in /var/pgsql/data/.
> 
> hi Josh,
> 
> thanks for reacting.
> 
> since the (test) server will be mainly a database server, i made my 
> /var the biggest partition and put the pg data in there. but, is there 
> any convention or default on where pg data are placed? i ask this to 
> make sure i don't run into trouble with an upgrade / RPM / DEB by 
> making an exotic choice now.

Debian puts the PostgreSQL data in /var/lib/postgres and the PGDG RPMs
(the ones that PostgreSQL produces) puts the data in /var/lib/pgsql .
One other thing to think about.  If your machine has more than one
hard drive moving the pg_xlog directory to another spindle (and using
a symlink in your data directory) can really be helpful performance
wise, but you want to have plenty of room for the log files to grow.

Jason

In response to

Responses

pgsql-novice by date

Next:From: Jules AlbertsDate: 2002-01-10 15:12:36
Subject: Re: location for pgdata
Previous:From: Jules AlbertsDate: 2002-01-10 07:49:15
Subject: Re: location for pgdata

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group