Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZggCE-0000S8-WF for pgsql-bugs@arkaria.postgresql.org; Mon, 28 Sep 2015 21:42:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZggCE-0007If-Cq for pgsql-bugs@arkaria.postgresql.org; Mon, 28 Sep 2015 21:42:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZggBb-0006bn-Hk for pgsql-bugs@postgresql.org; Mon, 28 Sep 2015 21:42:15 +0000 Received: from mout.gmx.com ([74.208.4.200]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.84) (envelope-from ) id 1ZggBU-0005Gc-2B for pgsql-bugs@postgresql.org; Mon, 28 Sep 2015 21:42:14 +0000 Received: from anaphora.localdomain ([5.102.233.80]) by mail.gmx.com (mrgmxus002) with ESMTPSA (Nemesis) id 0MI52u-1Zg8U137fS-003svL; Mon, 28 Sep 2015 23:42:04 +0200 Subject: Re: BUG #13643: Should a process dying bring postgresql down, or not? To: Alvaro Herrera References: <20150926032021.3005.82023@wrigleys.postgresql.org> <20150927185949.GP295765@alvherre.pgsql> <56085581.1000105@mail.com> <20150927210637.GR295765@alvherre.pgsql> Cc: pgsql-bugs@postgresql.org From: Amir Rohan Message-ID: <5609B428.6020006@mail.com> Date: Tue, 29 Sep 2015 00:42:00 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150927210637.GR295765@alvherre.pgsql> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:ggeLK2pfmzUOKySqRr3p8Ue7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: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 09/28/2015 12:06 AM, Alvaro Herrera wrote: > Amir Rohan wrote: >> On 09/27/2015 09:59 PM, Alvaro Herrera wrote: >>> 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] <<<<<<<<<<<<<<< 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] sending backup "pg_basebackup base backup" >>> >>> That postmaster is in STOPped mode is the issue here. That doesn't >>> happen unless you take specific action to do that. >> >> I hadn't noticed that. That looks like I suspended pg_ctl during start, >> but with the backup in progress already, it's not clear how I managed >> that state. There was no kill -SIGSTOP involved... > > Suspending a process *is* sending sigstop. You may not have sent > sigstop explicitely, but the shell would have done it if you suspended > the process. > > Since pg_ctl is not normally long-lived, I'm not sure how you ended up > suspending it. > >> After killing some subprocesses in random I do see postgres >> restarting the whole group once one goes down, if/once its >> running/unsuspended. > > Well, doing things randomly is unlikely to teach you much ... > Pardon my earlier HTML response, I had to use the webmail interface at the time. Sending again as text. > > > Sent: Monday, September 28, 2015 at 12:06 AM > From: "Alvaro Herrera" > To: "Amir Rohan" > Cc: pgsql-bugs@postgresql.org > Subject: Re: BUG #13643: Should a process dying bring postgresql down, or not? > Amir Rohan wrote: >> On 09/27/2015 09:59 PM, Alvaro Herrera wrote: >> > 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] <<<<<<<<<<<<<<< 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] sending backup "pg_basebackup base backup" >> > >> > That postmaster is in STOPped mode is the issue here. That doesn't >> > happen unless you take specific action to do that. >> >> I hadn't noticed that. That looks like I suspended pg_ctl during start, >> but with the backup in progress already, it's not clear how I managed >> that state. There was no kill -SIGSTOP involved... > > Suspending a process *is* sending sigstop. You may not have sent > sigstop explicitely, but the shell would have done it if you suspended > the process. > I *know*. But as you can see that backup process is already underway. That means pg_ctl had returned by then, and I had issued the pg_basebackup command. Since I didn't manually send a SIGSTOP, and postgres was already detached by then, I don't know how it could have gotten suspended. > Since pg_ctl is not normally long-lived, I'm not sure how you ended up > suspending it. > exactly. >> After killing some subprocesses in random I do see postgres >> restarting the whole group once one goes down, if/once its >> running/unsuspended. > > Well, doing things randomly is unlikely to teach you much ... > Well, It can teach you which electric socket will electrocute you when poked with a fork. That's useful data. Amir -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs