Re: postgresql-[any version] from FreeBSD ports - startup problems after crash

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: postgresql-[any version] from FreeBSD ports - startup problems after crash
Дата
Msg-id 20060515190033.GX26212@pervasive.com
обсуждение исходный текст
Ответ на Re: postgresql-[any version] from FreeBSD ports - startup problems after crash  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: postgresql-[any version] from FreeBSD ports - startup problems after crash  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Mon, May 15, 2006 at 09:23:33AM -0400, Tom Lane wrote:
> We've fixed this in recent releases by having the postmaster also check
> for a match to its parent process ID (getppid).  The care in the start
> script comes because this only works for one level up.  Therefore, you
> can't "su -c pg_ctl start ..." because that would create three levels of
> postgres-owned processes (shell, pg_ctl, postmaster) and if the PID
> count is off by 2 instead of 1 then we still lose.  You have to invoke
> the postmaster directly, "su -c postmaster ...".  (Hm, actually it might
> work to do "su -c 'exec pg_ctl ...'" ... I have not tried that.)

Except that the shell that's running su would be root, not pgsql, at
least in the case of FreeBSD. The guts of the current port's rc.d file
are:

su -l ${postgresql_user} -c "exec ${command} ${command_args} ${rc_arg}"
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: BUG #2437: Rules for COPY
Следующее
От: Tom Lane
Дата:
Сообщение: Re: postgresql-[any version] from FreeBSD ports - startup problems after crash