pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: Noah Misch <noah@leadboat.com>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: PITR potentially broken in 9.2
Date: Wed, 28 Nov 2012 15:15:56 +0200
Message-ID: <50B60E8C.7060602@vmware.com> (raw)
In-Reply-To: <20121128042728.GB26990@tornado.leadboat.com>
References: <CAMkU=1wpvYJVEDo6Qvq4QbosZ+AV6BMVCf+XVCG=mJqFRjQ8Pg@mail.gmail.com>
	<20121128042728.GB26990@tornado.leadboat.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 28.11.2012 06:27, Noah Misch wrote:
> On Tue, Nov 27, 2012 at 10:08:12AM -0800, Jeff Janes wrote:
>> Doing PITR in 9.2.1, the system claims that it reached a consistent
>> recovery state immediately after redo starts.
>> This leads to it various mysterious failures, when it should instead
>> throw a "requested recovery stop point is before consistent recovery
>> point" error.
>> (If you are unlucky, I think it might even silently start up in a
>> corrupt state.)
>
> I observed a similar problem with 9.2.  Despite a restore_command that failed
> every time, startup from a hot backup completed.  At the time, I suspected a
> mistake on my part.

I believe this was caused by this little typo/thinko:

> --- a/src/backend/access/transam/xlog.c
> +++ b/src/backend/access/transam/xlog.c
> @@ -6763,7 +6763,7 @@ StartupXLOG(void)
>  				/* Pop the error context stack */
>  				error_context_stack = errcontext.previous;
>
> -				if (!XLogRecPtrIsInvalid(ControlFile->backupStartPoint) &&
> +				if (!XLogRecPtrIsInvalid(ControlFile->backupEndPoint) &&
>  					XLByteLE(ControlFile->backupEndPoint, EndRecPtr))
>  				{
>  					/*

Normally, backupEndPoint is invalid, and we rely on seeing an 
end-of-backup WAL record to mark the location. backupEndPoint is only 
set when restoring from a backup that was taken from a standby, but 
thanks to the above, recovery incorrectly treats that as end-of-backup.

Fixed, thanks for the report!

- Heikki


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (61+ messages)  latest in thread

Message-ID: <50B60E8C.7060602@vmware.com>
Permalink:  ../50B60E8C.7060602@vmware.com/
Also on:    postgresql.org/message-id/50B60E8C.7060602@vmware.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: hlinnakangas@vmware.com, noah@leadboat.com, jeff.janes@gmail.com
  Subject: Re: PITR potentially broken in 9.2
  In-Reply-To: <50B60E8C.7060602@vmware.com>
  References: <CAMkU=1wpvYJVEDo6Qvq4QbosZ+AV6BMVCf+XVCG=mJqFRjQ8Pg@mail.gmail.com> <20121128042728.GB26990@tornado.leadboat.com> <50B60E8C.7060602@vmware.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