Re: Ctrl+C from sh can shut down daemonized PostgreSQL cluster

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Ctrl+C from sh can shut down daemonized PostgreSQL cluster
Date: 2014-02-17 17:09:09
Message-ID: 20140217170909.GA18932@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 17, 2014 at 10:38:29AM +0100, Bjorn Munch wrote:
> On 14/02 14.57, Kevin Grittner wrote:
> > We have had a case where a production cluster was accidentally shut
> > down by a customer who used Ctrl+C in the same sh session in which
> > they had (long before) run pg_ctl start.  We have only seen this in
> > sh on Solaris.  Other shells on Solaris don't behave this way, nor
> > does sh on tested versions of Linux.  Nevertheless, the problem is
> > seen on the default shell for a supported OS.
>
> What Solaris version, and what version of sh? sh on Solaris isn't
> necessarily the "real" bourne shell. In Solaris 11 it's actually
> ksh93.
>
> I've seen a sort-of opposite problem which does not appear in stock
> Solaris 10 or 11 but in OpenSolaris, at least the version I used to
> have on my desktop.
>
> And this was not PostgreSQL but MySQL.... There's a script mysqld_safe
> which will automatically restart the mysqld server if it dies. But in
> OpenSolaris with ksh version '93t', if I killed mysqld, the shell that
> started it also died. I never could figure out why. Solaris 11 with
> ksh '93u' does not have this problem. Nor does Solaris 10 with "real" sh.
>
> Is this customer by any chance running OpenSolaris?

FYI, this email post has a header line that causes all replies to go
_only_ to the group email address:

Mail-Followup-To: pgsql-hackers(at)postgresql(dot)org

I assume it is something related to the Oracle mail server or something
configured by the email author.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2014-02-17 17:10:17 Re: patch: option --if-exists for pg_dump
Previous Message Andres Freund 2014-02-17 17:07:22 Re: pg_basebackup skips pg_replslot directory