Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VJx66-0004LG-A7 for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Sep 2013 02:57:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VJx65-00034O-7D for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Sep 2013 02:57:33 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VJx62-00034D-SL for pgsql-hackers@postgresql.org; Thu, 12 Sep 2013 02:57:31 +0000 Received: from sam.nabble.com ([216.139.236.26]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VJx5w-0001nC-58 for pgsql-hackers@postgresql.org; Thu, 12 Sep 2013 02:57:30 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1VJx5u-0006BO-Dg for pgsql-hackers@postgresql.org; Wed, 11 Sep 2013 19:57:22 -0700 Date: Wed, 11 Sep 2013 19:57:22 -0700 (PDT) From: David Johnston To: pgsql-hackers@postgresql.org Message-ID: <1378954642417-5770559.post@n5.nabble.com> In-Reply-To: <20130912022800.GB260242@tornado.leadboat.com> References: <20130911033341.GD225735@tornado.leadboat.com> <20130911153200.GD2706@tamriel.snowman.net> <20130912022800.GB260242@tornado.leadboat.com> Subject: Re: Weaker shmem interlock w/o postmaster.pid MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 4.5 (++++) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Noah Misch-2 wrote >> > I'm thinking to preserve postmaster.pid at immediate shutdown in all >> released >> > versions, but I'm less sure about back-patching a change to make >> > PGSharedMemoryCreate() pickier. On the one hand, allowing startup to >> proceed >> > with backends still active in the same data directory is a corruption >> hazard. >> >> The corruption risk, imv anyway, is sufficient to backpatch the change >> and overrides the concerns around very fast shutdown/restarts. > > Making PGSharedMemoryCreate() pickier in all branches will greatly > diminish > the marginal value of preserving postmaster.pid, so I'm fine with dropping > the > postmaster.pid side of the proposal. Its probably still worth a fresh look at the immediate shutdown process to see whether the current location where postmaster.pid is removed is acceptable. It may not be necessary to leave it in place always but: 1) if there is a section of shared memory that can only be reached/found if one knows the pid, and 2) postmaster.pid is removed before that area is "secured from future clobbering" then there may be a risk that can still be mitigated by moving its removal without having to go to the extreme. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Weaker-shmem-interlock-w-o-postmaster-pid-tp5770399p5770559.html Sent from the PostgreSQL - hackers mailing list archive at Nabble.com. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers