<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div><span style="white-space: pre;">><br/>
><br/>
> Sent: Monday, September 28, 2015 at 12:06 AM<br/>
> From: "Alvaro Herrera" <alvherre(at)2ndquadrant(dot)com><br/>
> To: "Amir Rohan" <amir(dot)rohan(at)mail(dot)com><br/>
> Cc: pgsql-bugs(at)postgresql(dot)org<br/>
> Subject: Re: BUG #13643: Should a process dying bring postgresql down, or not?<br/>
> Amir Rohan wrote:<br/>
>> On 09/27/2015 09:59 PM, Alvaro Herrera wrote:<br/>
>> > amir(dot)rohan(at)mail(dot)com wrote:<br/>
>> ><br/>
>> >> 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<br/>
>> >> postgres 2183 0.0 0.0 134576 4168 ? Ss 03:34 0:00 postgres: checkpointer process<br/>
>> >> postgres 2184 0.0 0.0 134604 2844 ? Ss 03:34 0:00 postgres: writer process<br/>
>> >> postgres 2185 0.0 0.0 134468 2780 ? Ss 03:34 0:00 postgres: wal writer process<br/>
>> >> postgres 2186 0.0 0.0 0 0 ? Zs 03:34 0:00 [postgres] <defunct> <<<<<<<<<<<<<<< dead process<br/>
>> >> postgres 2187 0.0 0.0 127300 2204 ? Ss 03:34 0:00 postgres: stats collector process<br/>
>> >> 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<br/>
>> >> postgres 2194 0.0 0.0 134916 6016 ? Ss 03:34 0:00 postgres: wal sender process user1 [local] sending backup "pg_basebackup base backup"<br/>
>> ><br/>
>> > That postmaster is in STOPped mode is the issue here. That doesn't<br/>
>> > happen unless you take specific action to do that.<br/>
>><br/>
>> I hadn't noticed that. That looks like I suspended pg_ctl during start,<br/>
>> but with the backup in progress already, it's not clear how I managed<br/>
>> that state. There was no kill -SIGSTOP involved...<br/>
><br/>
> Suspending a process *is* sending sigstop. You may not have sent<br/>
> sigstop explicitely, but the shell would have done it if you suspended<br/>
> the process.<br/>
> </span><br/>
<br/>
I *know*. But as you can see that backup process is already underway.<br/>
That means pg_ctl had returned by then, and I had issued the pg_basebackup command. Since I didn't manually send a SIGSTOP,<br/>
and postgres was already detached by then, I don't know how it<br/>
could have gotten suspended.<br/>
<br/>
<span style="white-space: pre;">> Since pg_ctl is not normally long-lived, I'm not sure how you ended up<br/>
> suspending it.<br/>
> </span><br/>
<br/>
exactly.<br/>
<br/>
<span style="white-space: pre;">>> After killing some subprocesses in random I do see postgres<br/>
>> restarting the whole group once one goes down, if/once its<br/>
>> running/unsuspended.<br/>
><br/>
> Well, doing things randomly is unlikely to teach you much ...<br/>
> </span><br/>
<br/>
Well, It can teach you which electric socket will<br/>
electrocute you when poked with a fork. That's useful data.<br/>
<br/>
Amir<br/>
</div></div></body></html>