pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Treat <xzilla@users.sourceforge.net>
Cc: pgsql-admin@postgresql.org, Simon Riggs <simon@2ndquadrant.com>
Subject: Re: how is pitr replay interruption time determined?
Date: Tue, 28 Aug 2007 17:59:20 -0400
Message-ID: <4555.1188338360@sss.pgh.pa.us> (raw)
In-Reply-To: <200708281739.34094.xzilla@users.sourceforge.net>
References: <200708271742.57392.xzilla@users.sourceforge.net>
	<10268.1188256622@sss.pgh.pa.us>
	<200708281739.34094.xzilla@users.sourceforge.net>

Robert Treat <xzilla@users.sourceforge.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.)

Assuming that you're absorbing data from the master at a steady rate,
the only reason I can see for the timestamps to be so old is if the
"rm_safe_restartpoint" checks are always failing.  I seem to remember
that we found and fixed a bug that could cause something like that,
but I can't find any trace of it in the CVS logs.  Simon, do you
recall such a problem post-8.2.0?

			regards, tom lane



view thread (11+ messages)  latest in thread

Message-ID: <4555.1188338360@sss.pgh.pa.us>
Permalink:  ../4555.1188338360@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4555.1188338360@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, xzilla@users.sourceforge.net, simon@2ndquadrant.com
  Subject: Re: how is pitr replay interruption time determined?
  In-Reply-To: <4555.1188338360@sss.pgh.pa.us>

* 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