Re: Broken system timekeeping breaks the stats collector

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Broken system timekeeping breaks the stats collector
Date: 2012-06-17 15:38:10
Message-ID: 26209.1339947490@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs <simon(at)2ndQuadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-06-17 15:42:18 Re: libpq compression
Previous Message Peter Geoghegan 2012-06-17 15:36:20 Re: sortsupport for text