pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Yunong Xiao <yunong@joyent.com>
To: Heikki Linnakangas <hlinnakangas@vmware.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #7969: Postgres Recovery Fatal With: "incorrect local pin count:2"
Date: Thu, 11 Apr 2013 09:52:07 -0700
Message-ID: <21949434-BC5C-40B4-9A17-8AA4D665048F@gmail.com> (raw)
In-Reply-To: <51534D11.1040704@vmware.com>
References: <51533A15.5010408@agliodbs.com>
	<515342CF.1080805@vmware.com>
	<51534D11.1040704@vmware.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>


On Mar 27, 2013, at 12:48 PM, Heikki Linnakangas <hlinnakangas@vmware.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.

-Yunong

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (8+ messages)  latest in thread

Message-ID: <21949434-BC5C-40B4-9A17-8AA4D665048F@gmail.com>
Permalink:  ../21949434-BC5C-40B4-9A17-8AA4D665048F@gmail.com/
Also on:    postgresql.org/message-id/21949434-BC5C-40B4-9A17-8AA4D665048F@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: yunong@joyent.com, hlinnakangas@vmware.com
  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>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox