Re: BUG #6074: postgresql service script - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #6074: postgresql service script
Date
Msg-id 13224.1308801133@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #6074: postgresql service script  (Craig Ringer <craig@postnewspapers.com.au>)
Responses Re: BUG #6074: postgresql service script
List pgsql-bugs
Craig Ringer <craig@postnewspapers.com.au> writes:
> On 22/06/11 20:47, Tomas Enrique Cardozo Baudry wrote:
>> configuring the posgresql.conf on another port the service doesnt load the
>> port variable, because in the postgresql service script is a variable PGPORT
>> and this rewrite the configuration variable

> I'm pretty sure that init script is part of CentOS (probably really part
> of Red Hat Enterprise Linux), not part of PostgreSQL.

The relevant part of the RHEL5 initscript is

    # Set defaults for configuration variables
    PGENGINE=/usr/bin
    PGPORT=5432
    PGDATA=/var/lib/pgsql/data
    PGLOG=/var/lib/pgsql/pgstartup.log

    # Override defaults from /etc/sysconfig/pgsql if file is present
    [ -f /etc/sysconfig/pgsql/${NAME} ] && . /etc/sysconfig/pgsql/${NAME}

As this indicates, you are supposed to change those settings with a
script in /etc/sysconfig/pgsql/ if you need to change 'em.  It's
intentional that those settings win out over postgresql.conf.

I'm not entirely sure that the OP is using the RHEL RPMs, though,
because the fragment he quoted didn't quite match this.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Craig Ringer
Date:
Subject: Re: BUG #6074: postgresql service script
Next
From: "Kruus, Robert ENV"
Date:
Subject: Re: BUG #6069: C function returns NaN when part of an SQL function