Re: BUG #13643: Should a process dying bring postgresql down, or not?

From: "Amir Rohan" <amir(dot)rohan(at)mail(dot)com>
To: "Alvaro Herrera" <alvherre(at)2ndquadrant(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #13643: Should a process dying bring postgresql down, or not?
Date: 2015-09-27 22:36:44
Message-ID: trinity-ac190457-5ea8-4d23-a733-11de91023158-1443393403602@3capp-mailcom-lxa08
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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

Attachment Content-Type Size
unknown_filename text/html 3.2 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2015-09-27 23:46:19 Re: BUG #13638: Exception texts from plperl has bad encoding
Previous Message Alvaro Herrera 2015-09-27 21:06:37 Re: BUG #13643: Should a process dying bring postgresql down, or not?