Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UQLYx-0001YA-2g for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Apr 2013 17:45:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UQLYw-0005Ud-Jd for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Apr 2013 17:45:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UQLYw-0005UY-3t for pgsql-bugs@postgresql.org; Thu, 11 Apr 2013 17:45:30 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UQLYh-0002b9-8N for pgsql-bugs@postgresql.org; Thu, 11 Apr 2013 17:45:29 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r3BHjDhD006995; Thu, 11 Apr 2013 13:45:13 -0400 (EDT) From: Tom Lane To: "Yunong Xiao" cc: "Heikki Linnakangas" , pgsql-bugs@postgresql.org Subject: Re: BUG #7969: Postgres Recovery Fatal With: "incorrect local pin count:2" In-reply-to: <21949434-BC5C-40B4-9A17-8AA4D665048F@gmail.com> References: <51533A15.5010408@agliodbs.com> <515342CF.1080805@vmware.com> <51534D11.1040704@vmware.com> <21949434-BC5C-40B4-9A17-8AA4D665048F@gmail.com> Comments: In-reply-to "Yunong Xiao" message dated "Thu, 11 Apr 2013 09:52:07 -0700" Date: Thu, 11 Apr 2013 13:45:13 -0400 Message-ID: <6994.1365702313@sss.pgh.pa.us> X-Pg-Spam-Score: -4.3 (----) 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 "Yunong Xiao" writes: > On Mar 27, 2013, at 12:48 PM, Heikki Linnakangas wrote: >> This bug was introduced by commit 8805ff6580621d0daee350826de5211d6bb36ec3, 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 correctness 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=on where this would fail, but I'm also not 100% sure it can't happen. >> >> I scanned through the commit, and couldn't see any other instances of this kind of a bug. heap_xlog_update is more complicated than other redo functions, with all the return statements inside it. It could use some refactoring, but for now, I'll commit the attached small fix. >> >> - Heikki >> > Heikki: > Is it safe to apply the patch you attached? We'd really like to roll out this fix to production instead of waiting for this to be released as a postgres minor version update. Eh? That patch *is* in the latest minor versions. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs