Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 0CE39632CCF for ; Wed, 4 Aug 2010 13:56:26 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 86344-06 for ; Wed, 4 Aug 2010 16:56:18 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp.newsguy.com (smtp.newsguy.com [74.209.136.69]) by mail.postgresql.org (Postfix) with ESMTP id A5ABE632400 for ; Wed, 4 Aug 2010 13:56:18 -0300 (ADT) Received: from toncho.dhh.gt.org (174-124-54-239.dyn.centurytel.net [174.124.54.239] (may be forged)) by smtp.newsguy.com (8.14.3/8.14.3) with ESMTP id o74GuGD8019468 for ; Wed, 4 Aug 2010 09:56:17 -0700 (PDT) (envelope-from john@dhh.gt.org) Received: from [192.168.1.7] (helo=thumper.dhh.gt.org ident=Debian-exim) by toncho.dhh.gt.org with esmtp (Exim 3.36 #1 (Debian)) id 1OghGK-0002Sh-00 for ; Wed, 04 Aug 2010 11:56:16 -0500 Received: from john by thumper.dhh.gt.org with local (Exim 4.71) (envelope-from ) id 1OghGK-0002fD-2U for pgsql-sql@postgresql.org; Wed, 04 Aug 2010 11:56:16 -0500 From: John Hasler To: pgsql-sql@postgresql.org Subject: Re: What does PostgreSQL do when time goes backward? Organization: Dancing Horse Hill References: <87eiegblzq.fsf@thumper.dhh.gt.org> <20100804125524.GV12093@aart.is.rice.edu> Date: Wed, 04 Aug 2010 11:56:16 -0500 In-Reply-To: <20100804125524.GV12093@aart.is.rice.edu> (Kenneth Marshall's message of "Wed, 4 Aug 2010 07:55:24 -0500") Message-ID: <87wrs671vz.fsf@thumper.dhh.gt.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201008/18 X-Sequence-Number: 34458 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 , 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