pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Hasler <jhasler@newsguy.com>
To: pgsql-sql@postgresql.org
Subject: Re: What does PostgreSQL do when time goes backward?
Date: Wed, 04 Aug 2010 11:56:16 -0500
Message-ID: <87wrs671vz.fsf@thumper.dhh.gt.org> (raw)
In-Reply-To: <20100804125524.GV12093@aart.is.rice.edu>
References: <87eiegblzq.fsf@thumper.dhh.gt.org>
	<BLU0-SMTP860B73D3D0E9B478E3DF80ACAF0@phx.gbl>
	<20100804125524.GV12093@aart.is.rice.edu>

I wrote:
> How does PostgreSQL react to time being stepped at bootup?  My Chrony
> NTP package might cause it to do so on rare occasions when the
> hardware clock is way off.  This would only happen during bootup.

Ken writes:
> PostgreSQL does not use system time to track transactions so you
> should be good.

Thank you.

> Also, these types of clock changes by ntpd use the adjtime() system
> call which either slows or speeds the system clock to make the
> adjustment over a period of time so it should be minimally disruptive.

This is about Chrony <http://www.chrony.tuxfamily.org;, an alternative
ntp implementation.  In any case, both chronyd and ntpd can step the
clock (possibly backwards) at bootup under some rare circumstances.

Frank writes:
> My ntp client changes clock (by small amount) at any time:
> Jul 25 05:29:38 bax ntpd[10269]: adjusting local clock by 0.098724s
> Jul 25 05:31:43 bax ntpd[10269]: adjusting local clock by 0.038991s
> Jul 25 06:13:38 bax ntpd[10269]: adjusting local clock by -0.037131s
> Jul 25 15:01:52 bax ntpd[10269]: adjusting local clock by -0.112429s

Ken writes:
> These do seem to be larger values than you might expect from a clock
> conditioned with ntpd.  Is it a VM or is there something going on that
> would stop or suspend your system?

There is certainly something wrong there.
-- 
John Hasler 
jhasler@newsguy.com
Elmwood, WI USA



view thread (6+ messages)  latest in thread

Message-ID: <87wrs671vz.fsf@thumper.dhh.gt.org>
Permalink:  ../87wrs671vz.fsf@thumper.dhh.gt.org/
Also on:    postgresql.org/message-id/87wrs671vz.fsf@thumper.dhh.gt.org

 · 

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-sql@postgresql.org
  Cc: jhasler@newsguy.com
  Subject: Re: What does PostgreSQL do when time goes backward?
  In-Reply-To: <87wrs671vz.fsf@thumper.dhh.gt.org>

* 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