Subject: Bug affecting postgres now() function
From: Sean McCune <[email-masked]>
To: [email-masked]
Date: Sun, 27 Jun 2004 10:37:58 -0400

Folks,

I've run into a problem affecting postgres on cygwin 1.5.7 (yes, we're
upgrading, but those things have to be scheduled and infrequent).  We
have several systems that, after running for a month or two, will
exhibit the following symptom: "select now()" will start returning the
time at which the database started up (or thereabouts) rather than the
current time.  In one case now() was latched at that time forever.  In
another case now() seemed to drop back to that time but kept running
from there.

I am in the process now putting together an upgrade that will include
the latest version of cygwin.  Once I have it tested, I will deploy it
and in a month or two I'll know if the latest version suffers the same
problem or not.  But that's not a very good way of solving it, and it
won't make the users of the system happy.  :)

I found the following two messages in the cygwin archives that detailed
problems in the same area, but not exactly the same symptoms.

http://sources.redhat.com/ml/cygwin/2004-01/msg01392.html

http://www.cygwin.com/ml/cygwin/2003-07/msg01016.html

I was unable to duplicate either my symptoms or the symptoms described
above by changing the Windows system time as described in the above
messages.  In fact, I can't cause my problem to occur at will.  It only
occurs after letting the system run live and be used in production
(heavy use) for a month or two.

The postgres folk feel its definitely a cygwin problem because postgres
does not keep its own time. It only reports what ftime/gettimeofday
tells it. They have anecdotal remembrances of cygwin users describing
this problem to them before.

Has anyone here had and successfully dealt with this problem?  I'd like
to believe the cause attributed to in the messages above is it, so it
could be fixed.  But since the symptoms aren't exactly the same and I
can't duplicate using their method, I doubt it.

Thanks in advance for any info or advice.  :)

-- 
Sean McCune
Red Hand Software, Inc.
[email-masked] 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/