Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VbtT2-00023O-Sq for pgsql-hackers@arkaria.postgresql.org; Thu, 31 Oct 2013 14:43:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VbtT2-0001bG-BR for pgsql-hackers@arkaria.postgresql.org; Thu, 31 Oct 2013 14:43:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VbtT0-0001ZL-Bi for pgsql-hackers@postgresql.org; Thu, 31 Oct 2013 14:43:22 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VbtSw-0004fj-U8 for pgsql-hackers@postgresql.org; Thu, 31 Oct 2013 14:43:22 +0000 Received: from intern.anarazel.de (p5DDC4CD4.dip0.t-ipconnect.de [93.220.76.212]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id 4EA744E8002; Thu, 31 Oct 2013 15:43:18 +0100 (CET) Date: Thu, 31 Oct 2013 15:43:17 +0100 From: Andres Freund To: Tom Lane Cc: Robert Haas , Heikki Linnakangas , Andrew Dunstan , "pgsql-hackers@postgresql.org" Subject: Re: Something fishy happening on frogmouth Message-ID: <20131031144317.GA24221@alap2.anarazel.de> References: <6557.1383073940@sss.pgh.pa.us> <27889.1383139602@sss.pgh.pa.us> <20131030133718.GB11429@awork2.anarazel.de> <28492.1383140966@sss.pgh.pa.us> <527223E8.2020207@vmware.com> <20131031095021.GA31628@alap2.anarazel.de> <22875.1383229757@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <22875.1383229757@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) 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 On 2013-10-31 10:29:17 -0400, Tom Lane wrote: > Robert Haas writes: > > On Thu, Oct 31, 2013 at 5:50 AM, Andres Freund wrote: > >> On 2013-10-31 11:33:28 +0200, Heikki Linnakangas wrote: > >>> Wait, that sounds horrible. If you kill -9 the server, and then rm -rf > >>> $PGDATA, the shared memory segment is leaked until next reboot? > > >> Our main shared memory segment works the same way, doesn't it? And it > >> has for a long time. > > > It does, and what's the alternative, anyway? > > Well, what we expect from the existing shmem code is that restarting the > postmaster will clean things up, ie find and destroy the leaked shmem. > It sounds to me like this may not work like that, in which case I agree > with Heikki that it's not really acceptable. The code writes a state file containing the identity of the dsm "control segment" used last time. That state file is read at startup and if it still exists used to attach to the control segment which contains a list of "user defined" dsm segments so they can be cleaned up Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers