Re: CentOS initd Script

From: Devrim GÜNDÜZ <devrim(at)gunduz(dot)org>
To: Kenaniah Cerny <kenaniah(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: CentOS initd Script
Date: 2012-09-12 09:14:11
Message-ID: 1347441251.27768.48.camel@lenovo01-laptop03.gunduz.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Edson Richter 2012-09-12 11:06:00 Re: Compressed binary field
Previous Message Stuart Bishop 2012-09-12 09:13:59 Race condition between hot_standby_feedback and wal_receiver_status_interval ?