Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UQRFy-0002jc-EU for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Apr 2013 23:50:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UQRFx-0005wF-PY for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Apr 2013 23:50:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UQLg7-0000OF-K7 for pgsql-bugs@postgresql.org; Thu, 11 Apr 2013 17:52:55 +0000 Received: from exprod8og111.obsmtp.com ([64.18.3.22]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UQLg2-0002p4-Rk for pgsql-bugs@postgresql.org; Thu, 11 Apr 2013 17:52:55 +0000 Received: from outbound.postini8.com ([184.72.54.204]) by exprod8ob111.postini.com ([64.18.7.12]) with SMTP ID DSNKUWb4cV5mCAFr6bEidi7p7VD6glF+hqyv@postini.com; Thu, 11 Apr 2013 10:52:50 PDT Received: from mail pickup service by outbound.postini8.com with Microsoft SMTPSVC; Thu, 11 Apr 2013 10:52:49 -0700 thread-index: Ac423WFNfVCyT/ZUTtyd8r2O0kD6HQ== 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=P8T8/HmI30ZuqrGSKG+vFDxvIQtQ6MM0rsPNCIfpCpc=; b=ZeZVGOyPtnJ2YHHB6mFWvHz+N4IQ0onm+52pvltqpA3ufT5g7E8BoHTUhD1viotKG9 be/aeNkQbTGWQ2jH4bZwocPD0NiPIXjuCRYLACSq+2Bb6fzzh4GzBQberHaFStUm9ixf DoE4o66lCzwFIvDO8k2vz0RP27zkwVsaUyxAUXXKHKhK8/jvyB++jG9HK5r9tCVT7F54 BBI3mHJV080phvINhrtWdrpPa63QfAJbs8UUNMH9SMzIoo51PJHDTD7KLTVEt+EHHZ72 arOok3il3VjRloUnJvS2hoygk0QOC+8e7YC1l4WgT4OqVjMwPZZS1CIYBqjZWfEcUkBq SWzg== X-Received: by 10.68.137.168 with SMTP id qj8mr10412149pbb.17.1365702768465; Thu, 11 Apr 2013 10:52:48 -0700 (PDT) X-Received: by 10.68.137.168 with SMTP id qj8mr10412142pbb.17.1365702768415; Thu, 11 Apr 2013 10:52:48 -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: <6994.1365702313@sss.pgh.pa.us> Date: Thu, 11 Apr 2013 10:52:47 -0700 Cc: "Heikki Linnakangas" , Content-Transfer-Encoding: quoted-printable Message-ID: References: <51533A15.5010408@agliodbs.com> <515342CF.1080805@vmware.com> <51534D11.1040704@vmware.com> <21949434-BC5C-40B4-9A17-8AA4D665048F@gmail.com> <6994.1365702313@sss.pgh.pa.us> To: "Tom Lane" X-Mailer: Apple Mail (2.1503) X-Gm-Message-State: ALoCoQlSDH/lI3Tt1Yg47hEhWJZhka3yvbBijzQYiKfw8wsGDC1BssozovRCMRQdNHcm8sn6xVgY+BuPrvNbeF400stCR83ilE+efLilr8m/BJDHL+Lt3taYho+J+T4Yieh6tjmB6PuGhBtuXOoVBte6Iz/ThKyOIRB4lD0sDLFzyOSoIUTaD+4= X-OriginalArrivalTime: 11 Apr 2013 17:52:48.0828 (UTC) FILETIME=[614AAFC0:01CE36DD] 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 Apr 11, 2013, at 10:45 AM, Tom Lane wrote: > "Yunong Xiao" writes: >> On Mar 27, 2013, at 12:48 PM, Heikki Linnakangas wrote: >>> This bug was introduced by commit 8805ff6580621d0daee350826de5211d6bb36= ec3, in 9.2.2 (and 9.1.7 and 9.0.11), which fixed multiple WAL replay issue= s 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 co= rrectness of hot standby. The patch fixed that, but missed releasing the ol= d buffer in this corner case. I was not able to come up with a scenario wit= h full_page_writes=3Don where this would fail, but I'm also not 100% sure i= t can't happen. >>>=20 >>> I scanned through the commit, and couldn't see any other instances of t= his kind of a bug. heap_xlog_update is more complicated than other redo fun= ctions, with all the return statements inside it. It could use some refacto= ring, but for now, I'll commit the attached small fix. >>>=20 >>> - Heikki >>> >=20 >> Heikki: >=20 >> 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 pos= tgres minor version update. >=20 > Eh? That patch *is* in the latest minor versions. >=20 > regards, tom lane Indeed it is. My apologies. Thanks so much for the fix! --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs