Re: PG in container w/ pid namespace is init, process exits cause restart

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: PG in container w/ pid namespace is init, process exits cause restart
Date: 2021-05-04 20:53:40
Message-ID: 20210504205340.GK27406@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 04, 2021 at 01:35:50PM -0400, Greg Stark wrote:
> Fwiw, I have a suspicion that the right check for being init is
> whether `pid == ppid`.

pryzbyj(at)pryzbyj:~$ ps -wwf 1
UID PID PPID C STIME TTY STAT TIME CMD
root 1 0 0 2020 ? Ss 10:28 /sbin/init

As I recall, on some OS, pid 0 is the "swapper".

--
Justin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2021-05-04 21:13:36 Re: MaxOffsetNumber for Table AMs
Previous Message Peter Geoghegan 2021-05-04 20:51:22 Re: MaxOffsetNumber for Table AMs