Re: CentOS initd Script - Mailing list pgsql-general

From Devrim GÜNDÜZ
Subject Re: CentOS initd Script
Date
Msg-id 1347441251.27768.48.camel@lenovo01-laptop03.gunduz.org
Whole thread Raw
In response to CentOS initd Script  (Kenaniah Cerny <kenaniah@gmail.com>)
Responses Re: CentOS initd Script  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi,

On Tue, 2012-09-11 at 23:41 -0700, Kenaniah Cerny wrote:

> In the service script that gets installed to /etc/rc.d/init.d/, there is a
> hard-coded value for PGPORT. Would it be possible to have this variable and
> the corresponding -p flag set when calling postgres removed?
>
> Explicitly specifying the port flag causes the port setting of
> postgresql.conf to be ignored. When postgresql.conf does not have the port
> explicitly defined, postgres falls back on the value of PGPORT, and
> ultimately 5432 when PGPORT is not present in the environment.
>
> My main use case for this request is concurrently running multiple
> versions of postgresql on non-standard ports on the same box.

Ok, this is still doable -- just change ports on both postgresql.conf
and init script,  and start postmasters. I can't see why having PGPORT
in the init script prevents there.

There are some reasons for having it there, btw, like inefficiency of
parsing postgresql.conf via shell script to get the port., etc.

FWIW, Fedora switched to systemd, RHEL 7 will be switching to systemd,
too, so I'm not that much excited about changing the current behavior.

Regards,
--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org  Twitter: http://twitter.com/devrimgunduz

Attachment

pgsql-general by date:

Previous
From: Stuart Bishop
Date:
Subject: Race condition between hot_standby_feedback and wal_receiver_status_interval ?
Next
From: Edson Richter
Date:
Subject: Re: Compressed binary field