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

From Craig Ringer
Subject Re: BUG #6074: postgresql service script
Date
Msg-id 4E02B489.6070104@postnewspapers.com.au
Whole thread Raw
In response to BUG #6074: postgresql service script  ("Tomas Enrique Cardozo Baudry" <tomas.enrique.cardozo.baudry@gmail.com>)
Responses Re: BUG #6074: postgresql service script
List pgsql-bugs
On 22/06/11 20:47, Tomas Enrique Cardozo Baudry wrote:
>
> The following bug has been logged online:
>
> Bug reference:      6074
> Logged by:          Tomas Enrique Cardozo Baudry
> Email address:      tomas.enrique.cardozo.baudry@gmail.com
> PostgreSQL version: 8.4.4
> Operating system:   Centos 5.6
> Description:        postgresql service script
> Details:
>
> 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 script should *not* respect values from the environment; it's a good
thing that it doesn't. Otherwise setting PGPORT to tell psql what to do
would as a side effect change what port the server listened on if you
restarted it from that shell!

What the script should do is get those settings from /etc/sysconfig or
/etc/default (dunno which CentOS uses) so you don't have to hack the
init script directly.

--
Craig Ringer

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #6072: VPATH build fails in src/backend/port for src tarball, errcodes.h not found
Next
From: Tom Lane
Date:
Subject: Re: BUG #6074: postgresql service script