Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UQLAb-0007xl-SW for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Apr 2013 17:20:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UQLAa-00076u-Jb for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Apr 2013 17:20:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UQKjT-0001s1-JM for pgsql-bugs@postgresql.org; Thu, 11 Apr 2013 16:52:19 +0000 Received: from exprod8og117.obsmtp.com ([64.18.3.34]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UQKjN-0000ru-LK for pgsql-bugs@postgresql.org; Thu, 11 Apr 2013 16:52:19 +0000 Received: from outbound.postini8.com ([184.72.54.206]) by exprod8ob117.postini.com ([64.18.7.12]) with SMTP ID DSNKUWbqO8S1BVZS/mL6scl3R+khn4pEOYHm@postini.com; Thu, 11 Apr 2013 09:52:13 PDT Received: from mail pickup service by outbound.postini8.com with Microsoft SMTPSVC; Thu, 11 Apr 2013 09:52:11 -0700 thread-index: Ac421OjoZ4rolndgS1qCSNDVKJHHaQ== Content-Class: urn:content-classes:message Importance: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4325 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-received:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to:x-mailer:x-gm-message-state; bh=qB9/g1H4mlY4X4WO8km1ecpLmvmk6bxLepDcJzleAeM=; b=XOZBRnnGtJ3/x0j91+0YGXeDMfyfsM8snVk3ussY/jPAUzXwki37IKX23xohx2x+0u euMoP4hlTPFao/Oy8JkCLYBAbiLvSTNxm1IFhFwqBCMqfpZqrtMZL8X3+Q7b6UIIXGs/ gVKMEfKR0UAIWhhY+qvg+AUrcL59futhc/HJfwr5fwtIkQchFONPbsij6v+HBl5+8SsX uJSMPshJK5gbi/KgyQZMZXVUm/WPnBRbNWAtW1I90ZuGCZQpMdWW75slZd0gns60T0ld VC7V8DWbEOG8RMZgn4aGu44F14VdUcteNpSN03hB6BaRzK1//HeWHCQoqQK1Y9VsWMjH uDiQ== X-Received: by 10.66.246.168 with SMTP id xx8mr10618155pac.107.1365699130464; Thu, 11 Apr 2013 09:52:10 -0700 (PDT) X-Received: by 10.66.246.168 with SMTP id xx8mr10618147pac.107.1365699130398; Thu, 11 Apr 2013 09:52:10 -0700 (PDT) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Subject: Re: BUG #7969: Postgres Recovery Fatal With: "incorrect local pin count:2" From: "Yunong Xiao" In-Reply-To: <51534D11.1040704@vmware.com> Date: Thu, 11 Apr 2013 09:52:07 -0700 Cc: Content-Transfer-Encoding: quoted-printable Message-ID: <21949434-BC5C-40B4-9A17-8AA4D665048F@gmail.com> References: <51533A15.5010408@agliodbs.com> <515342CF.1080805@vmware.com> <51534D11.1040704@vmware.com> To: "Heikki Linnakangas" X-Mailer: Apple Mail (2.1503) X-Gm-Message-State: ALoCoQkMpP4kkWSIFT8xcWnm+knBPZf6AHhU8Kuiv0wU8N/cGNGAAOAD8ujbRVGOPumfEirNOhdLgMQfCLlSH2j7ysy5hxW2DO7Tp9Ttxb+UR/DnzM0aZ1zgGz0XHrBClBETkwgygwSZSs1u1dVqNxJ8u1Ihih/2/CI2wcFNw45C5OjMPCvZKxA= X-OriginalArrivalTime: 11 Apr 2013 16:52:10.0870 (UTC) FILETIME=[E8E65960:01CE36D4] X-Delivery-MTA: 10.0.1.62:ismtp.joyent.com X-Pg-Spam-Score: -4.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 Mar 27, 2013, at 12:48 PM, Heikki Linnakangas = wrote: >=20 > This bug was introduced by commit 8805ff6580621d0daee350826de5211d6bb36ec= 3, in 9.2.2 (and 9.1.7 and 9.0.11), which fixed multiple WAL replay issues = with Hot Standby. Before that commit, replaying a heap update didn't try to= keep both buffers locked at the same time, which is necessary for the corr= ectness of hot standby. The patch fixed that, but missed releasing the old = buffer in this corner case. I was not able to come up with a scenario with = full_page_writes=3Don where this would fail, but I'm also not 100% sure it = can't happen. >=20 > I scanned through the commit, and couldn't see any other instances of thi= s kind of a bug. heap_xlog_update is more complicated than other redo funct= ions, with all the return statements inside it. It could use some refactori= ng, but for now, I'll commit the attached small fix. >=20 > - Heikki > Heikki: Is it safe to apply the patch you attached? We'd really like to roll out th= is fix to production instead of waiting for this to be released as a postgr= es minor version update. -Yunong --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs