Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VbodL-0006fV-Nc for pgsql-hackers@arkaria.postgresql.org; Thu, 31 Oct 2013 09:33:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VbodK-0000Dh-EL for pgsql-hackers@arkaria.postgresql.org; Thu, 31 Oct 2013 09:33:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VbodI-0000DT-QZ for pgsql-hackers@postgresql.org; Thu, 31 Oct 2013 09:33:40 +0000 Received: from smtp-outbound-1.vmware.com ([208.91.2.12]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VbodE-0007Nw-Ks for pgsql-hackers@postgresql.org; Thu, 31 Oct 2013 09:33:39 +0000 Received: from sc9-mailhost2.vmware.com (sc9-mailhost2.vmware.com [10.113.161.72]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 36B2A98045; Thu, 31 Oct 2013 02:33:32 -0700 (PDT) Received: from zcs-prod-ext-mta-1.vmware.com (zcs-prod-ext-mta-1.vmware.com [10.113.62.223]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id 2887EB054B; Thu, 31 Oct 2013 02:33:32 -0700 (PDT) Received: from zcs-prod-ext-mta-1.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTP id 06855120032; Thu, 31 Oct 2013 02:40:37 -0700 (PDT) Received: from [10.203.200.185] (zimbra-prod-ext-proxy-vip.vmware.com [10.113.63.87]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTPSA; Thu, 31 Oct 2013 02:40:35 -0700 (PDT) Message-ID: <527223E8.2020207@vmware.com> Date: Thu, 31 Oct 2013 11:33:28 +0200 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9 MIME-Version: 1.0 To: Robert Haas CC: Tom Lane , Andres Freund , Andrew Dunstan , "pgsql-hackers@postgresql.org" Subject: Re: Something fishy happening on frogmouth References: <6557.1383073940@sss.pgh.pa.us> <27889.1383139602@sss.pgh.pa.us> <20131030133718.GB11429@awork2.anarazel.de> <28492.1383140966@sss.pgh.pa.us> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -7.4 (-------) 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 30.10.2013 18:52, Robert Haas wrote: > Here's a short summary of what I posted back in August: at system > startup time, the postmaster creates one dynamic shared segment, > called the control segment. That segment sticks around for the > lifetime of the server and records the identity of any *other* dynamic > shared memory segments that are subsequently created. If the server > dies a horrible death (e.g. kill -9), the next postmaster will find > the previous control segment (whose ID is written to a file in the > data directory) and remove any leftover shared memory segments from > the previous run; without this, such segments would live until the > next server reboot unless manually removed by the user (which isn't > even practical on all platforms; e.g. there doesn't seem to be any way > to list all exstant POSIX shared memory segments on MacOS X, so a user > wouldn't know which segments to remove). Wait, that sounds horrible. If you kill -9 the server, and then rm -rf $PGDATA, the shared memory segment is leaked until next reboot? I find that unacceptable. There are many scenarios where you never restart postmaster after a crash. For example, if you have an automatic failover setup; you fail over to the standby in case of crash, and re-initialize the old master with e.g rsync. - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers