Re: PostgreSQL configuration - Mailing list pgsql-hackers

From Kevin Brown
Subject Re: PostgreSQL configuration
Date
Msg-id 20040415224901.GE9566@filer
Whole thread Raw
In response to Re: PostgreSQL configuration  ("Simon Riggs" <simon@2ndquadrant.com>)
Responses Re: PostgreSQL configuration
List pgsql-hackers
Simon Riggs wrote:
> Very much agreed. PGDATA is important, lets keep it, please.

To me it's not so much whether or not PGDATA is kept around for the
system as a whole so much as how it's used.

In the general case, scripts are used to start the postmaster.  So using
PGDATA even if the postmaster doesn't directly make use of it is a
simple matter of adding '-D "$PGDATA"' to the command that invokes the
postmaster.

The goal here is simply to make it obvious to a system administrator where
the PG data directory that a given postmaster is using resides.  We can't
rely on the mechanism used to change the command string that ps shows for
the process: in my experience it's something that often does not work.
And in any case, the system administrator will also want to know exactly
what options were passed to the postmaster when it was invoked.


If there's any group that can figure out how to effortlessly get PGDATA
onto the command line of the backend utilities, it's the developer
group.  :-)


In any case, I'm not at all opposed to having the backend stuff know
about PGDATA during development, but for production you should have to
explicitly specify the data directory on the command line.  That seems
easy enough to do: #ifdef is your friend.



-- 
Kevin Brown                          kevin@sysexperts.com


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: sql_sizing
Next
From: Tom Lane
Date:
Subject: Re: signal 11 on AIX: 7.4.2