From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Greg Stark <gsstark(at)mit(dot)edu> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: time-delayed standbys |
Date: | 2011-04-20 14:19:35 |
Message-ID: | 26007.1303309175@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Greg Stark <gsstark(at)mit(dot)edu> writes:
> On Wed, Apr 20, 2011 at 2:19 PM, Robert Haas <robertmhaas(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2011-04-20 14:20:27 | Re: REINDEX vs broken HOT chains, redux |
Previous Message | Alvaro Herrera | 2011-04-20 14:14:26 | Re: pgbench \for or similar loop |