Re: Re: [COMMITTERS] pgsql: Send new protocol keepalive messages to standby servers.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Send new protocol keepalive messages to standby servers.
Date: 2012-06-01 03:46:00
Message-ID: 4015.1338522360@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> Now, measuring time skew is potentially a useful thing to do, if we
> believe that this will actually give us an accurate measurement of
> what the time skew is, because there are a whole series of things that
> people want to do which involve subtracting a slave timestamp from a
> master timestamp. Tom has persistently rebuffed all such proposals on
> the grounds that there might be time skew, so in theory we could make
> those things possible by having a way to measure time skew, which this
> does. Here's what we do: given a slave timestamp, add the estimated
> time skew to find an equivalent master timestamp, and then subtract.
> Using a method of this type would allow us to compute a *real* apply
> delay. Woohoo! Unfortunately, if time synchronization IS in use,
> then the system clocks are probably already synchronized three to six
> orders of magnitude more precisely than what this method can measure,
> so the effect of using GetReplicationTransferLatency() to adjust slave
> timestamps will be to massively reduce the accuracy of such
> calculations. However, I've thus far been unable to convince anyone
> that this is a bad idea, so maybe this is where we're gonna end up.

Hmm ... first question is do we actually care whether the clocks are
synced to the millisecond level, ie what is it you'd do differently
if you know that the master and slave clocks are synced more closely
than you can measure at the protocol level.

But if there is a reason to care, perhaps we could have a setting that
says "we're using NTP, so trust the clocks to be synced"? What I object
to is assuming that without any evidence, or being unable to operate
correctly in an environment where it's not true.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Simon Riggs 2012-06-01 07:21:17 pgsql: Provide interim statistics while in mid-checkpoint.
Previous Message Tom Lane 2012-05-31 23:17:17 pgsql: Stamp 9.2beta2.

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2012-06-01 04:17:27 Re: slow dropping of tables, DropRelFileNodeBuffers, tas
Previous Message Jeff Janes 2012-06-01 03:44:59 Re: 9.2beta1, parallel queries, ReleasePredicateLocks, CheckForSerializableConflictIn in the oprofile