From: Jeff Davis <pgsql@j-davis.com>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Recovery bug
Date: Mon, 25 Oct 2010 09:04:32 -0700
Message-ID: <1288022672.8516.801.camel@jdavis> (raw)
In-Reply-To: <4CC56DA5.3040908@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>
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.
It looks like the patch leaves the global variable pointing just after
the redo location rather than the checkpoint. I haven't tested your
patch yet, but it looks like some of the following code depends on
ReadRecord(NULL,...) fetching the record right after the checkpoint
record; so I think something else is required if you want to use
ReadRecord.
Regards,
Jeff Davis
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: pgsql@j-davis.com, heikki.linnakangas@enterprisedb.com
Subject: Re: Recovery bug
In-Reply-To: <1288022672.8516.801.camel@jdavis>
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>
* 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