pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
easy one: location of the database cluster
5+ messages / 4 participants
[nested] [flat]

* easy one: location of the database cluster
@ 2004-12-16 08:55 Iain <iain@mst.co.jp>
  2004-12-16 14:21 ` Re: easy one: location of the database cluster Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 5+ messages in thread

From: Iain @ 2004-12-16 08:55 UTC (permalink / raw)
  To: pgsql-admin

Hi All,

I'm in the process of putting together some docs for a new postgres server. 
For development use, I've always just been content to have the PGDATA 
directory as a subdirectory of the main postgres install directory which is 
/usr/local/pgsql/ by default (when installing from source anyway).

My question is whether there is any good reason not to do that in a 
production environment (for example upgrade time)?

Is there a "standard" directory that people tend to use for this, such as 
/var/local/pgsql/ ?

Even if there are no standards, I do like to follow conventions where they 
exist, since I don't expect to be around by the time this system will be 
requiring it's first round of maintenance ;-)

OS is (will most probably be) RHEL3

Cheers
Iain 




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: easy one: location of the database cluster
  2004-12-16 08:55 easy one: location of the database cluster Iain <iain@mst.co.jp>
@ 2004-12-16 14:21 ` Peter Eisentraut <peter_e@gmx.net>
  2004-12-16 16:14   ` Re: easy one: location of the database cluster Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 5+ messages in thread

From: Peter Eisentraut @ 2004-12-16 14:21 UTC (permalink / raw)
  To: Iain <iain@mst.co.jp>; +Cc: pgsql-admin

Iain wrote:
> Is there a "standard" directory that people tend to use for this,
> such as /var/local/pgsql/ ?

According to the Filesystem Hierarchy Standard, program data should be 
under /var/lib/<packagename>.  Indeed, many binary distributions use 
some variant of that as data directory location.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: easy one: location of the database cluster
  2004-12-16 08:55 easy one: location of the database cluster Iain <iain@mst.co.jp>
  2004-12-16 14:21 ` Re: easy one: location of the database cluster Peter Eisentraut <peter_e@gmx.net>
@ 2004-12-16 16:14   ` Tom Lane <tgl@sss.pgh.pa.us>
  2004-12-16 18:02     ` Re: easy one: location of the database cluster ogjunk-pgjedan@yahoo.com
  0 siblings, 1 reply; 5+ messages in thread

From: Tom Lane @ 2004-12-16 16:14 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: Iain <iain@mst.co.jp>; pgsql-admin

Peter Eisentraut <peter_e@gmx.net> writes:
> Iain wrote:
>> Is there a "standard" directory that people tend to use for this,
>> such as /var/local/pgsql/ ?

> According to the Filesystem Hierarchy Standard, program data should be 
> under /var/lib/<packagename>.  Indeed, many binary distributions use 
> some variant of that as data directory location.

The RPM distributions of PG use /var/lib/pgsql/data as the standard
PGDATA value.  I'm not sure what Debian does but I think it might be
different.  Also there has been some talk of including the major
release number (7.4, 8.0, etc) in the standard PGDATA value, to ease
migration across server versions by allowing different versions to be
installed concurrently.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: easy one: location of the database cluster
  2004-12-16 08:55 easy one: location of the database cluster Iain <iain@mst.co.jp>
  2004-12-16 14:21 ` Re: easy one: location of the database cluster Peter Eisentraut <peter_e@gmx.net>
  2004-12-16 16:14   ` Re: easy one: location of the database cluster Tom Lane <tgl@sss.pgh.pa.us>
@ 2004-12-16 18:02     ` ogjunk-pgjedan@yahoo.com
  2004-12-17 02:02       ` Re: easy one: location of the database cluster Iain <iain@mst.co.jp>
  0 siblings, 1 reply; 5+ messages in thread

From: ogjunk-pgjedan@yahoo.com @ 2004-12-16 18:02 UTC (permalink / raw)
  To: pgsql-admin


--- Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Peter Eisentraut <peter_e@gmx.net> writes:
> > Iain wrote:
> >> Is there a "standard" directory that people tend to use for this,
> >> such as /var/local/pgsql/ ?
> 
> > According to the Filesystem Hierarchy Standard, program data should
> be 
> > under /var/lib/<packagename>.  Indeed, many binary distributions
> use 
> > some variant of that as data directory location.
> 
> The RPM distributions of PG use /var/lib/pgsql/data as the standard
> PGDATA value.  I'm not sure what Debian does but I think it might be
> different.  Also there has been some talk of including the major
> release number (7.4, 8.0, etc) in the standard PGDATA value, to ease
> migration across server versions by allowing different versions to be
> installed concurrently.

Oh, this would be excellent!  The fear of dealing with 2 different
versions and the fear of overwriting something by mistake is what's
keeping me from upgrading my PG installation.

Otis



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: easy one: location of the database cluster
  2004-12-16 08:55 easy one: location of the database cluster Iain <iain@mst.co.jp>
  2004-12-16 14:21 ` Re: easy one: location of the database cluster Peter Eisentraut <peter_e@gmx.net>
  2004-12-16 16:14   ` Re: easy one: location of the database cluster Tom Lane <tgl@sss.pgh.pa.us>
  2004-12-16 18:02     ` Re: easy one: location of the database cluster ogjunk-pgjedan@yahoo.com
@ 2004-12-17 02:02       ` Iain <iain@mst.co.jp>
  0 siblings, 0 replies; 5+ messages in thread

From: Iain @ 2004-12-17 02:02 UTC (permalink / raw)
  To: pgsql-admin

Hi,

Looks like I should get to know the "Filesystem Hierarchy Standard" atleast 
a little better.

>> The RPM distributions of PG use /var/lib/pgsql/data as the standard
>> PGDATA value.  I'm not sure what Debian does but I think it might be
>> different.  Also there has been some talk of including the major
>> release number (7.4, 8.0, etc) in the standard PGDATA value, to ease
>> migration across server versions by allowing different versions to be
>> installed concurrently.
>
> Oh, this would be excellent!  The fear of dealing with 2 different
> versions and the fear of overwriting something by mistake is what's
> keeping me from upgrading my PG installation.

This is partly my concern also. It's only a concern for me because I don't 
have any direct experience of managing and upgrading production systems 
using packages, I have always used the source code download. Backing up your 
databases before an upgrade is always advisable, but on the other hand, we 
typically don't want to have to endure a restore just because we messed up a 
minor upgrade. if you are building from source it's no problem as you just 
don't run initdb. As to package upgrades, presumably they don't touch your 
data. I have to write a manual for the maintenance and updating of the 
server, so I'm gonna have to test it all anyway.

Getting back to my original question (as I think it was) I havn't seen any 
reason not to use the default data directory used by the package, especially 
if it conforms with the above mentioned standard.

Regards
Iain 




^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2004-12-17 02:02 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-12-16 08:55 easy one: location of the database cluster Iain <iain@mst.co.jp>
2004-12-16 14:21 ` Peter Eisentraut <peter_e@gmx.net>
2004-12-16 16:14   ` Tom Lane <tgl@sss.pgh.pa.us>
2004-12-16 18:02     ` ogjunk-pgjedan@yahoo.com
2004-12-17 02:02       ` Iain <iain@mst.co.jp>

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