Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id BDCE51337B2F for ; Tue, 26 Oct 2010 15:49:18 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 22549-03 for ; Tue, 26 Oct 2010 18:49:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og112.obsmtp.com (exprod7og112.obsmtp.com [64.18.2.177]) by mail.postgresql.org (Postfix) with SMTP id EC2681336DB6 for ; Tue, 26 Oct 2010 15:49:10 -0300 (ADT) Received: from source ([209.85.215.173]) by exprod7ob112.postini.com ([64.18.6.12]) with SMTP ID DSNKTMcipXWRsNYkCsfm20KQ79R4lsviL7dn@postini.com; Tue, 26 Oct 2010 11:49:11 PDT Received: by eyh5 with SMTP id 5so2741520eyh.4 for ; Tue, 26 Oct 2010 11:49:08 -0700 (PDT) Received: by 10.14.37.77 with SMTP id x53mr5075291eea.25.1288118948550; Tue, 26 Oct 2010 11:49:08 -0700 (PDT) Received: from [192.168.1.183] (dsl-hkibrasgw2-ff7ac300-240.dhcp.inet.fi [88.195.122.240]) by mx.google.com with ESMTPS id v56sm8977024eeh.8.2010.10.26.11.49.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 26 Oct 2010 11:49:07 -0700 (PDT) Message-ID: <4CC7228C.7020002@enterprisedb.com> Date: Tue, 26 Oct 2010 21:48:44 +0300 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.1.12) Gecko/20100913 Icedove/3.0.7 MIME-Version: 1.0 To: Jeff Davis CC: pgsql-bugs@postgresql.org Subject: Re: Recovery bug References: <1287183483.30681.54.camel@jdavis-ux.asterdata.local> <1287355728.8516.383.camel@jdavis> <4CBD6458.4050400@enterprisedb.com> <1287507095.8516.547.camel@jdavis> <1287517214.20345.5.camel@jdavis-ux.asterdata.local> <4CC56DA5.3040908@enterprisedb.com> <1288022672.8516.801.camel@jdavis> <4CC687CB.6080306@enterprisedb.com> In-Reply-To: <4CC687CB.6080306@enterprisedb.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.2 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3 X-Spam-Level: X-Archive-Number: 201010/234 X-Sequence-Number: 28524 On 26.10.2010 10:48, Heikki Linnakangas wrote: > On 25.10.2010 19:04, Jeff Davis wrote: >> On Mon, 2010-10-25 at 14:44 +0300, Heikki Linnakangas wrote: >>> It seems we should use ReadRecord instead of the lower-level >>> XLogPageRead function. One difference is that ReadRecord performs a >>> bunch of sanity checks on the record, while XLogPageRead just reads the >>> raw page. Extra sanity checking before removing backup_label seems like >>> a good idea. Another difference is that in standby-mode, ReadRecord will >>> retry until it succeeds. A standby server should keep retrying, even the >>> very first record, until it succeeds, otherwise we have a change in >>> behavior. >> >> The reason I didn't use ReadRecord is because it sets a global variable >> to point to the next location in the log, so that subsequent calls can >> just pass NULL for the location. > > True. XLogPageRead is new in 9.0, however. We'll have to use ReadRecord > or invent something new for back-branches anyway. Ok, committed the patch I posted earlier today using ReadRecord. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com