pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Aaron <aarmel@netagi.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Time slowly goes out of sync Cygwin+windows+psotgres
Date: Thu, 29 Aug 2002 10:14:34 -0400
Message-ID: <26510.1030630474@sss.pgh.pa.us> (raw)
In-Reply-To: <3D658765.5080603@netagi.com>
References: <3D658765.5080603@netagi.com>

Aaron <aarmel@netagi.com> writes:
> Is postgres calculateing the time itself or reading of the machines clock?

Postgres just asks the OS what time it is.  I think you have an
off-speed system clock crystal (lots of PC-grade hardware will
gain or lose 10 minutes/month :-().

I don't know what test you are using to convince yourself that the OS
time is correct when Postgres' time is different --- but I'll bet lunch
you made a mistake.

One other thing to watch for is that "SELECT now()" returns the time as
of the start of the current transaction.  If you said "begin" and then
waited ten minutes you could get a 10-minute discrepancy.  I doubt you
did that, but it's something to be aware of.

			regards, tom lane



view thread (3+ messages)  latest in thread

Message-ID: <26510.1030630474@sss.pgh.pa.us>
Permalink:  ../26510.1030630474@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/26510.1030630474@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, aarmel@netagi.com
  Subject: Re: Time slowly goes out of sync Cygwin+windows+psotgres
  In-Reply-To: <26510.1030630474@sss.pgh.pa.us>
  References: <3D658765.5080603@netagi.com> <26510.1030630474@sss.pgh.pa.us>

* 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