Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Zuk7F-0003rz-R6 for pgsql-bugs@arkaria.postgresql.org; Fri, 06 Nov 2015 16:43:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Zuk7F-0000Ys-Co for pgsql-bugs@arkaria.postgresql.org; Fri, 06 Nov 2015 16:43:53 +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 1Zuk6c-0007aY-2w for pgsql-bugs@postgresql.org; Fri, 06 Nov 2015 16:43:14 +0000 Received: from out.smtp-auth.no-ip.com ([8.23.224.60]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Zuk6T-0004wQ-M0 for pgsql-bugs@postgresql.org; Fri, 06 Nov 2015 16:43:13 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [200.104.52.149]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id A8C974018FE; Fri, 6 Nov 2015 08:42:58 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id DDCF8210E; Fri, 6 Nov 2015 13:42:54 -0300 (CLT) Date: Fri, 6 Nov 2015 13:42:54 -0300 From: Alvaro Herrera 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 Message-ID: <20151106164254.GB6104@alvherre.pgsql> References: <20151105190132.14034.15191@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20151105190132.14034.15191@wrigleys.postgresql.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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