current_timestamp wrong

From: Peter Pilsl <pilsl(at)goldfisch(dot)at>
To: pgsql-general(at)postgresql(dot)org
Subject: current_timestamp wrong
Date: 2001-08-22 21:50:38
Message-ID: 20010822235038.A63349@i3.atat.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)goldfisch(dot)at
sms : pilsl(at)max(dot)mail(dot)at

pgp-key available

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Murray Hobbs 2001-08-22 22:01:07 protected ON DELETE CASCADE
Previous Message Johann Zuschlag 2001-08-22 20:43:03 Re: Comparing fixed precision to floating (no anwer)