Re: CentOS initd Script

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: CentOS initd Script
Дата
Msg-id 25085.1347460562@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: CentOS initd Script  (Devrim GÜNDÜZ <devrim@gunduz.org>)
Список pgsql-general
Devrim =?ISO-8859-1?Q?G=DCND=DCZ?= <devrim@gunduz.org> 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


В списке pgsql-general по дате отправления:

Предыдущее
От: Herouth Maoz
Дата:
Сообщение: Is there a way to use "pack" in pl/perl without resorting to pl/perlu?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Is there a way to use "pack" in pl/perl without resorting to pl/perlu?