pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Jeff Davis <pgsql@j-davis.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Recovery bug
Date: Tue, 26 Oct 2010 21:48:44 +0300
Message-ID: <4CC7228C.7020002@enterprisedb.com> (raw)
In-Reply-To: <4CC687CB.6080306@enterprisedb.com>
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>

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



view thread (20+ messages)  latest in thread

Message-ID: <4CC7228C.7020002@enterprisedb.com>
Permalink:  ../4CC7228C.7020002@enterprisedb.com/
Also on:    postgresql.org/message-id/4CC7228C.7020002@enterprisedb.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: heikki.linnakangas@enterprisedb.com, pgsql@j-davis.com
  Subject: Re: Recovery bug
  In-Reply-To: <4CC7228C.7020002@enterprisedb.com>
  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> <4CC7228C.7020002@enterprisedb.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