Re: BUG #13643: Should a process dying bring postgresql down, or not? - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #13643: Should a process dying bring postgresql down, or not?
Date
Msg-id 20150927185949.GP295765@alvherre.pgsql
Whole thread Raw
In response to BUG #13643: Should a process dying bring postgresql down, or not?  (amir.rohan@mail.com)
Responses Re: BUG #13643: Should a process dying bring postgresql down, or not?  (Amir Rohan <amir.rohan@mail.com>)
List pgsql-bugs
amir.rohan@mail.com wrote:

> postgres     2181  0.0  0.1 134468  9504 pts/0    T    03:34   0:00 /usr/local/pgsql/bin/postgres -D
/home/local/pg/s1
> postgres     2183  0.0  0.0 134576  4168 ?        Ss   03:34   0:00 postgres: checkpointer process
> postgres     2184  0.0  0.0 134604  2844 ?        Ss   03:34   0:00 postgres: writer process
> postgres     2185  0.0  0.0 134468  2780 ?        Ss   03:34   0:00 postgres: wal writer process
> postgres     2186  0.0  0.0      0     0 ?        Zs   03:34   0:00 [postgres] <defunct>         <<<<<<<<<<<<<<< dead
process
> postgres     2187  0.0  0.0 127300  2204 ?        Ss   03:34   0:00 postgres: stats collector process
> postgres     2193  0.0  0.0 118164  2696 pts/0    T    03:34   0:00 pg_basebackup -D /home/local/pg/backup -p 57833
--format=t-x 
> postgres     2194  0.0  0.0 134916  6016 ?        Ss   03:34   0:00 postgres: wal sender process user1 [local]
sendingbackup "pg_basebackup base backup" 
>
> Not sure if this is a real problem or not, but it was my understanding that
> pg panics when a subprocess dies for safety resons.

A zombie process is a process that died and hasn't been collected by its
parent process.  In this case, postmaster is stopped ("T" above), so it
cannot call wait() to collect the dead process.  Once you signal
postmaster to run again, it will either discover that the process died
cleanly (and clean up state and all is well), or that it died uncleanly
(in which case it will cause all other processes to stop).

That postmaster is in STOPped mode is the issue here.  That doesn't
happen unless you take specific action to do that.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql-bugs by date:

Previous
From: Tim Bunce
Date:
Subject: Re: BUG #13638: Exception texts from plperl has bad encoding
Next
From: Amir Rohan
Date:
Subject: Re: BUG #13643: Should a process dying bring postgresql down, or not?