Simon Riggs <simon@2ndQuadrant.com> writes:
> Fine, but please log this as a WARNING system time skew detected, so
> we can actually see it has happened rather than just silently
> accepting the situation.
I think elog(LOG) is more appropriate, same as we have for the existing
messages for related complaints. No one backend is going to have a
complete view of the situation, and the collector itself has to use
LOG since it has no connected client at all. So the postmaster log
is the place to look for evidence of clock trouble.
> Perhaps we should do the same test at startup to see if the clock has
> gone backwards then also.
Uh ... backwards from what? And what difference would it make? We
always force an immediate write of the stats file at startup anyway.
regards, tom lane