pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pitr standby on slave with skewed time
3+ messages / 3 participants
[nested] [flat]

* pitr standby on slave with skewed time
@ 2008-07-11 15:19 Robert Treat <xzilla@users.sourceforge.net>
  2008-07-11 16:15 ` Re: pitr standby on slave with skewed time Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Robert Treat @ 2008-07-11 15:19 UTC (permalink / raw)
  To: pgsql-admin

Howdy folks,

Was review a clients config/setup and ran across a pitr warm standby scenario 
where the master machine is set to the current time, but the slave's time is 
currently sitting back in the month of May. Outside of getting ntp setup on 
the machine, I am wondering if I need to do anything special with the 
postgresql setup, or if just setting the correct date on the machine is a 
safe enough operation that nothing else would need to be done (like re-doing 
the base backup). Any thoughts? 

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pitr standby on slave with skewed time
  2008-07-11 15:19 pitr standby on slave with skewed time Robert Treat <xzilla@users.sourceforge.net>
@ 2008-07-11 16:15 ` Tom Lane <tgl@sss.pgh.pa.us>
  2008-07-11 17:15   ` Re: pitr standby on slave with skewed time Simon Riggs <simon@2ndquadrant.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2008-07-11 16:15 UTC (permalink / raw)
  To: Robert Treat <xzilla@users.sourceforge.net>; +Cc: pgsql-admin

Robert Treat <xzilla@users.sourceforge.net> writes:
> Was review a clients config/setup and ran across a pitr warm standby scenario
> where the master machine is set to the current time, but the slave's time is 
> currently sitting back in the month of May. Outside of getting ntp setup on 
> the machine, I am wondering if I need to do anything special with the 
> postgresql setup, or if just setting the correct date on the machine is a 
> safe enough operation that nothing else would need to be done (like re-doing 
> the base backup). Any thoughts? 

AFAIR you should be all right ... PITR only looks at WAL indexes, not
file timestamps.

The slave does watch the current time to decide when to do recovery
restartpoints, so if you were setting the clock *back* by a large amount
it might be wise to stop and restart the slave postmaster.  Forward
should be no problem though.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pitr standby on slave with skewed time
  2008-07-11 15:19 pitr standby on slave with skewed time Robert Treat <xzilla@users.sourceforge.net>
  2008-07-11 16:15 ` Re: pitr standby on slave with skewed time Tom Lane <tgl@sss.pgh.pa.us>
@ 2008-07-11 17:15   ` Simon Riggs <simon@2ndquadrant.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Simon Riggs @ 2008-07-11 17:15 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Robert Treat <xzilla@users.sourceforge.net>; pgsql-admin


On Fri, 2008-07-11 at 12:15 -0400, Tom Lane wrote:
> Robert Treat <xzilla@users.sourceforge.net> writes:
> > Was review a clients config/setup and ran across a pitr warm standby scenario
> > where the master machine is set to the current time, but the slave's time is 
> > currently sitting back in the month of May. Outside of getting ntp setup on 
> > the machine, I am wondering if I need to do anything special with the 
> > postgresql setup, or if just setting the correct date on the machine is a 
> > safe enough operation that nothing else would need to be done (like re-doing 
> > the base backup). Any thoughts? 
> 
> AFAIR you should be all right ... PITR only looks at WAL indexes, not
> file timestamps.

WAL filenames, just in case anybody listening thinks "I didn't create an
index on my WAL, should I?". This is so people that set their pg_xlog
filesystem no file modification timestamps don't screw up their
recovery.

> The slave does watch the current time to decide when to do recovery
> restartpoints, so if you were setting the clock *back* by a large amount
> it might be wise to stop and restart the slave postmaster.  Forward
> should be no problem though.

Yeh, you're good.

-- 
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2008-07-11 17:15 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-07-11 15:19 pitr standby on slave with skewed time Robert Treat <xzilla@users.sourceforge.net>
2008-07-11 16:15 ` Tom Lane <tgl@sss.pgh.pa.us>
2008-07-11 17:15   ` Simon Riggs <simon@2ndquadrant.com>

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