Re: BUG #7969: Postgres Recovery Fatal With: "incorrect local pin count:2"

From: "Yunong Xiao" <yunong(at)joyent(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Heikki Linnakangas" <hlinnakangas(at)vmware(dot)com>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #7969: Postgres Recovery Fatal With: "incorrect local pin count:2"
Date: 2013-04-11 17:52:47
Message-ID: A7208DDC-7306-4A2F-82B8-669582AE8DF3@joyent.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


On Apr 11, 2013, at 10:45 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> "Yunong Xiao" <yunong(at)joyent(dot)com> writes:
>> On Mar 27, 2013, at 12:48 PM, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> 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
>>> <fix-heap-update-redo-buffer-leak.patch>
>
>> 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

Indeed it is. My apologies. Thanks so much for the fix!

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message rajuk058 2013-04-12 04:39:54 BUG #8057: Unable to Connect PostgresSQL Remotely
Previous Message Tom Lane 2013-04-11 17:45:13 Re: BUG #7969: Postgres Recovery Fatal With: "incorrect local pin count:2"