current_timestamp wrong - Mailing list pgsql-general

From Peter Pilsl
Subject current_timestamp wrong
Date
Msg-id 20010822235038.A63349@i3.atat.at
Whole thread Raw
Responses Re: current_timestamp wrong
Re: current_timestamp wrong
Re: current_timestamp wrong
List pgsql-general
version 7.0.1

In a bigger perl-project I had to hunt down a bug and it turned out that on
very rare occassions the time delivered by 'current_timestamp'
is wrong by a noticeable amount of time. (up to hours sometimes)

The problem occures when using the DBI-module for perl and mod_perl in
apache and the db-handle is stored globally for hours. On the first
call for current_timestamp after long idle-time the returned value is
*sometimes* incorrect.

Creating a subrouting, doing nothing but fetching and printing the
system-time and the database-time in the apps-logfile I get things like this:
 2001-08-21-13:59:18     192.168.11.1  databasetime    2001-08-21 13:54:34+02


Is there any chance that this is a postgreSQL-problem or did someone
hear about this before or is it definitely a problem within perl, the
DBI-module or the application ?

 It looks like a cache-problem, but no involved part should actually
do caching on such an operation. mod_perl is always a dangerous one
for caching, but in this case I used only local variables ..

thnx,
peter


--
mag. peter pilsl

phone: +43 676 3574035
fax  : +43 676 3546512
email: pilsl@goldfisch.at
sms  : pilsl@max.mail.at

pgp-key available

pgsql-general by date:

Previous
From: "Johann Zuschlag"
Date:
Subject: Re: Comparing fixed precision to floating (no anwer)
Next
From: Murray Hobbs
Date:
Subject: protected ON DELETE CASCADE