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

Re: how is pitr replay interruption time determined?

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-admin(at)postgresql(dot)org
Subject: Re: how is pitr replay interruption time determined?
Date: 2007-08-29 14:48:54
Message-ID: 200708291048.54662.xzilla@users.sourceforge.net (view raw or flat)
Thread:
Lists: pgsql-admin
On Tuesday 28 August 2007 18:44, Simon Riggs wrote:
> On Tue, 2007-08-28 at 17:59 -0400, Tom Lane wrote:
> > Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> writes:
> > > Is there some way to force checkpoints on a db doing wal replay?
> >
> > No, it's hardwired to do it when it sees a checkpoint record in the WAL
> > stream.
> >
> > > pg_control last modified:             Mon Aug 27 12:12:55 2007
> > > Time of latest checkpoint:            Mon Jul 30 19:17:37 2007
> >
> > After looking again at the code, the "last modified" time is the time
> > that a recovery checkpoint was last done, and the "latest checkpoint"
> > is the timestamp of the WAL-stream checkpoint record that triggered it.
> > In a situation where you're catching up on historical WAL they could be
> > far apart, but when a slave is just following the master there shouldn't
> > be a huge difference --- not more than the maximum time to fill a WAL
> > record and ship it over to the slave, for sure.
> >
> > (BTW, I misread it before --- it looks like the "at log time" value
> > printed at startup *is* taken from the checkpoint record that it's
> > trying to roll forward from.)
>
> That's correct. Sorry for not replying earlier; just back from hols.
>
> Jumping back to original thought: Robert, you should be using the last
> checkpoint location, not the last time to decide which xlogs to remove.
>

Looking at last checkpoint location in pg_control, I see:
Latest checkpoint location:           1C/8001E848

How does one translate that into an xlog file name? 

-- 
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL

In response to

Responses

pgsql-admin by date

Next:From: Tom LaneDate: 2007-08-29 14:49:26
Subject: Re: No restore of BLOB data (permissions?)
Previous:From: Robert TreatDate: 2007-08-29 14:44:17
Subject: Re: how is pitr replay interruption time determined?

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