Skip site navigation (1) Skip section navigation (2)

Re: Verified fix for Bug 4137

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Verified fix for Bug 4137
Date: 2008-05-06 23:29:17
Message-ID: 1210116557.4435.485.camel@ebony.site (view raw or flat)
Thread:
Lists: pgsql-patches
On Tue, 2008-05-06 at 21:51 +0100, Heikki Linnakangas wrote:

> In fact, what will happen if the checkpoint record's redo pointer points 
> to an earlier xlog file:
> 
> 1. The location of the checkpoint record is read by read_backup_label(). 
> Let's say that it's 0005.
> 2. ReadCheckpointRecord() is called for 0005. The restore command is 
> called because that xlog file is not present. The safe truncation point 
> is determined to be 0005, as that's what we're reading. Everything 
> before that is truncated
> 3. The redo pointer in the checkpoint record points to 0003. That's 
> where we should start the recovery. Oops :-(

Yes, this case could be a problem, if the records are in different
files. It's the files that matter, not the records themselves though.

I've extended the patch without introducing another new status variable,
which was my original concern with what you suggested previously.

-- 
  Simon Riggs
  2ndQuadrant  http://www.2ndQuadrant.com

Attachment: standby_restartbug.v2.patch
Description: text/x-patch (3.9 KB)

In response to

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2008-05-06 23:54:29
Subject: Re: column level privileges
Previous:From: Tom LaneDate: 2008-05-06 22:19:20
Subject: Re: [GENERAL] psql \pset pager

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group