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

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Amir Rohan <amir(dot)rohan(at)mail(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-28 21:53:57
Message-ID: 20150928215357.GZ295765@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Amir Rohan 2015-09-28 22:24:26 Re: BUG #13643: Should a process dying bring postgresql down, or not?
Previous Message Amir Rohan 2015-09-28 21:42:00 Re: BUG #13643: Should a process dying bring postgresql down, or not?