Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UKvef-0002br-O0 for pgsql-bugs@arkaria.postgresql.org; Wed, 27 Mar 2013 19:05:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UKvef-0006gC-75 for pgsql-bugs@arkaria.postgresql.org; Wed, 27 Mar 2013 19:05:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UKvee-0006g6-CU for pgsql-bugs@postgresql.org; Wed, 27 Mar 2013 19:05:00 +0000 Received: from smtp-outbound-2.vmware.com ([208.91.2.13]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UKveY-0006cj-UB for pgsql-bugs@postgresql.org; Wed, 27 Mar 2013 19:04:58 +0000 Received: from sc9-mailhost2.vmware.com (sc9-mailhost2.vmware.com [10.113.161.72]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id B84A3285B0; Wed, 27 Mar 2013 12:04:50 -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 B3C59B08D5; Wed, 27 Mar 2013 12:04:50 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTP id 72A8A1219E2; Wed, 27 Mar 2013 12:08:53 -0700 (PDT) X-Virus-Scanned: amavisd-new at zcs-prod-ext-mta-1.vmware.com Received: from zcs-prod-ext-mta-1.vmware.com ([127.0.0.1]) by localhost (zcs-prod-ext-mta-1.vmware.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FVjyvu9Xt2FO; Wed, 27 Mar 2013 12:08:53 -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 471241219DF; Wed, 27 Mar 2013 12:08:53 -0700 (PDT) Received: from [192.168.1.90] (zimbra-prod-ext-proxy-vip.vmware.com [10.113.63.87]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTPSA; Wed, 27 Mar 2013 12:08:52 -0700 (PDT) Message-ID: <515342CF.1080805@vmware.com> Date: Wed, 27 Mar 2013 21:04:47 +0200 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: Josh Berkus CC: pgsql-bugs@postgresql.org Subject: Re: Re: BUG #7969: Postgres Recovery Fatal With: "incorrect local pin count:2" References: <51533A15.5010408@agliodbs.com> In-Reply-To: <51533A15.5010408@agliodbs.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -8.2 (--------) 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 On 27.03.2013 20:27, Josh Berkus wrote: > Folks, > > So I'm a bit surprised that this bug report hasn't gotten a follow-up. > Does this sound like the known 9.2.2 corruption issue, or is it > potentially something else? It seems like a new issue. At a quick glance, I think there's a bug in heap_xlog_update, ie. the redo routine of a heap update. If the new tuple is put on a different page, and at redo, the new page doesn't exist (that's normal if it was later vacuumed away), heap_xlog_update leaks a pin on the old page. Here: > { > nbuffer = XLogReadBuffer(xlrec->target.node, > ItemPointerGetBlockNumber(&(xlrec->newtid)), > false); > if (!BufferIsValid(nbuffer)) > return; > page = (Page) BufferGetPage(nbuffer); > > if (XLByteLE(lsn, PageGetLSN(page))) /* changes are applied */ > { > UnlockReleaseBuffer(nbuffer); > if (BufferIsValid(obuffer)) > UnlockReleaseBuffer(obuffer); > return; > } > } Notice how in the first 'return' above, obuffer is not released. I'll try to create a reproducible test case for this, and fix.. - Heikki -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs