Skip site navigation (1) Skip section navigation (2)

our friend the win32 system timer.

From: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
To: <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: our friend the win32 system timer.
Date: 2004-08-16 19:25:01
Message-ID: 6EE64EF3AB31D5448D0007DD34EEB3412A7460@Herge.rcsinc.local (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers-win32
Depending on how you look at it, this may be a semi-serious problem in
win32.  pg uses the C library time routines to calculate elapsed time
and supply values.

Unfortunately, this value is only updated for each timeslice allocated
to the thread.  The resolution of this timer is about 10 ms...

This means that a table with a timestamp column defaulted to now() and a
unique constraint on that column will have a very high chance of
constraint violations.  This might happen when reading in values from a
script, and it works fine on Linux.

A side issue is that psql analyze timings are not useful below 10 ms.
Should the win32 high performance counter, QueryPerformanceCounter, be



pgsql-hackers-win32 by date

Next:From: Bruce MomjianDate: 2004-08-16 19:44:27
Subject: Re: our friend the win32 system timer.
Previous:From: Tom LaneDate: 2004-08-16 18:53:14
Subject: Re: REPOST: InitDB Failure on install

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group