pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Greg Stark <gsstark@mit.edu>
Cc: pgsql-hackers@postgresql.org
Subject: Re: time-delayed standbys
Date: Wed, 20 Apr 2011 11:15:06 -0400
Message-ID: <27149.1303312506@sss.pgh.pa.us> (raw)
In-Reply-To: <BANLkTikqGottQvyBzrXsARkaWMB2OEMGEA@mail.gmail.com>
References: <BANLkTi==TTzHDqWzwJDjmOf__8YuA7L1jw@mail.gmail.com>
	<BANLkTi=QScpDTkUw3iw6JaO15uUvx_P4qg@mail.gmail.com>
	<BANLkTimarB9eLhHpW73ja2oGvCaWNQuD6g@mail.gmail.com>
	<BANLkTi=hR3vGUDX-SQf=nFcL9ycmrQ6Fcg@mail.gmail.com>
	<BANLkTikPdjn98yjSR-VYywyjMe64wdrdDQ@mail.gmail.com>
	<26007.1303309175@sss.pgh.pa.us>
	<BANLkTikqGottQvyBzrXsARkaWMB2OEMGEA@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> I am a bit concerned about the reliability of this approach.  If there
> is some network lag, or some lag in processing from the master, we
> could easily get the idea that there is time skew between the machines
> when there really isn't.  And our perception of the time skew could
> easily bounce around from message to message, as the lag varies.  I
> think it would be tremendously ironic of the two machines were
> actually synchronized to the microsecond, but by trying to be clever
> about it we managed to make the lag-time accurate only to within
> several seconds.

Well, if walreceiver concludes that there is no more than a few seconds'
difference between the clocks, it'd probably be OK to take the master
timestamps at face value.  The problem comes when the skew gets large
(compared to the configured time delay, I guess).

			regards, tom lane



view thread (114+ messages)  latest in thread

Message-ID: <27149.1303312506@sss.pgh.pa.us>
Permalink:  ../27149.1303312506@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27149.1303312506@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-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, gsstark@mit.edu
  Subject: Re: time-delayed standbys
  In-Reply-To: <27149.1303312506@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