pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Greg Stark <gsstark@mit.edu>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: time-delayed standbys
Date: Wed, 20 Apr 2011 10:19:35 -0400
Message-ID: <26007.1303309175@sss.pgh.pa.us> (raw)
In-Reply-To: <BANLkTikPdjn98yjSR-VYywyjMe64wdrdDQ@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>

Greg Stark <gsstark@mit.edu> writes:
> On Wed, Apr 20, 2011 at 2:19 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>> How would we keep track of the most recent timestamp received from the
>> master without replaying the WAL records?

> Well as we receive them we would have to peek at them to see the time.
> Or we could have the master send its time to the slave as I believe
> Tom has already proposed in the past but I believe didn't choose to
> do?

My idea of how to manage it would be to have walreceiver explicitly
track the clock difference from the master, which it can do since
walsender puts its current time into every message header.  You can use
the slave's clock for comparisons so long as you add the appropriate
offset.  (The theory here is that the skew won't change very fast ...)

			regards, tom lane



view thread (114+ messages)  latest in thread

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