From: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Ruslan A Dautkhanov <rusland(at)scn(dot)ru>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: postgresql-[any version] from FreeBSD ports - startup problems after crash |
Date: | 2006-05-15 19:00:33 |
Message-ID: | 20060515190033.GX26212@pervasive.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-05-15 19:12:11 | Re: postgresql-[any version] from FreeBSD ports - startup problems after crash |
Previous Message | Jim C. Nasby | 2006-05-15 18:46:00 | Re: BUG #2437: Rules for COPY |