Search Postgresql Archives

Re: CentOS initd Script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Devrim =?ISO-8859-1?Q?G=DCND=DCZ?= <devrim@xxxxxxxxxx> writes:
> 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?

>> 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.

Yeah.  Historically the argument for doing it like this was (1) the
script couldn't reliably get the port value out of the configure file,
and (2) if you want to run multiple postmasters, you need distinct
PGPORT and PGDATA values for each one, so it was more consistent and
convenient to specify both those things at the service-script level.

Argument (1) is obsolete since PG 9.1 or so (maybe --- systemd's lame
excuse for a scripting language would still have trouble here).  But
I still find argument (2) to be pretty convincing.  What's the value
of specifying the port in postgresql.conf?  AFAICS that would prevent
you from using identical config files for different postmasters, with
no real benefit in return.

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux