Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 6C5A59FA3EA for ; Wed, 29 Aug 2007 11:51:37 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 10422-04 for ; Wed, 29 Aug 2007 11:51:27 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from vms040pub.verizon.net (vms040pub.verizon.net [206.46.252.40]) by postgresql.org (Postfix) with ESMTP id 3BD719FA3AB for ; Wed, 29 Aug 2007 11:51:34 -0300 (ADT) Received: from new-host.home ([71.179.23.138]) by vms040.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JNJ00F6DIHXQFJ5@vms040.mailsrvcs.net> for pgsql-admin@postgresql.org; Wed, 29 Aug 2007 09:49:11 -0500 (CDT) Date: Wed, 29 Aug 2007 10:48:54 -0400 From: Robert Treat Subject: Re: how is pitr replay interruption time determined? In-reply-to: <1188341069.4218.93.camel@ebony.site> To: Simon Riggs Cc: Tom Lane , pgsql-admin@postgresql.org Message-id: <200708291048.54662.xzilla@users.sourceforge.net> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-15 Content-transfer-encoding: 7bit Content-disposition: inline References: <200708271742.57392.xzilla@users.sourceforge.net> <4555.1188338360@sss.pgh.pa.us> <1188341069.4218.93.camel@ebony.site> User-Agent: KMail/1.9.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/392 X-Sequence-Number: 26723 On Tuesday 28 August 2007 18:44, Simon Riggs wrote: > On Tue, 2007-08-28 at 17:59 -0400, Tom Lane wrote: > > Robert Treat 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