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 20150928215357.GZ295765@alvherre.pgsql
Whole thread Raw
In response to Re: BUG #13643: Should a process dying bring postgresql down, or not?  (Amir Rohan <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 wrote:
> On 09/28/2015 12:06 AM, Alvaro Herrera wrote:
> > Amir Rohan wrote:

> >> > 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.

Maybe if you do pg_ctl in a terminal and it remains there as an
unfinished job, then close the terminal, it will get sent a SIGSTOP.
I have vague recollections that stuff worked in this way.

> >> 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.

If you *learn* which one was it, you weren't doing it randomly but
systematically trying them all.  That's what I wanted to point out.

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

pgsql-bugs by date:

Previous
From: Amir Rohan
Date:
Subject: Re: BUG #13643: Should a process dying bring postgresql down, or not?
Next
From: "Amir Rohan"
Date:
Subject: Re: BUG #13643: Should a process dying bring postgresql down, or not?