pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: vijaysam@mailworks.org
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #13757: Able to write to postgres even when the main process has been killed
Date: Fri, 6 Nov 2015 13:42:54 -0300
Message-ID: <20151106164254.GB6104@alvherre.pgsql> (raw)
In-Reply-To: <20151105190132.14034.15191@wrigleys.postgresql.org>
References: <20151105190132.14034.15191@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

vijaysam@mailworks.org wrote:

> But, when I try to kill -9 the master server main postgres process. The
> client code from java is able to continue to write to the postgres db which
> was the old master as there was a connection established to this server and
> the connection keeps allowing write to happen as thought the server is still
> running. I understand kill -9 is a bad thing.

Good thing that you do.  Don't do it, as it's not a proper shutdown
procedure.  There are three documented signals with varying degrees of
shutdown immediacy: SIGTERM, SIGINT, SIGQUIT.  The postmaster process
will take action to terminate server processes as appropriate if you use
those signals.  SIGKILL is entirely inappropriate.  If you would like to
use SIGKILL, you need to send it to *all* postgres processes, which will
cause a shutdown very similar in nature to SIGQUIT.

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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (7+ messages)  latest in thread

Message-ID: <20151106164254.GB6104@alvherre.pgsql>
Permalink:  ../20151106164254.GB6104@alvherre.pgsql/
Also on:    postgresql.org/message-id/20151106164254.GB6104@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: alvherre@2ndquadrant.com, vijaysam@mailworks.org
  Subject: Re: BUG #13757: Able to write to postgres even when the main process has been killed
  In-Reply-To: <20151106164254.GB6104@alvherre.pgsql>
  References: <20151105190132.14034.15191@wrigleys.postgresql.org> <20151106164254.GB6104@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox