Re: [Windows,PATCH] Use faster, higher precision timer API

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Fabris Giovanni Consulente <cons(dot)FabrisGiovanni(at)sia(dot)eu>
Subject: Re: [Windows,PATCH] Use faster, higher precision timer API
Date: 2014-09-18 03:37:21
Message-ID: 541A5371.3030509@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 09/17/2014 11:19 PM, Andrew Dunstan wrote:
>
> On 09/17/2014 08:27 AM, Craig Ringer wrote:
>> Hi all
>> On Windows 2012 and Windows 8 I'd like to use the new
>> GetSystemTimePreciseAsFileTime call instead. As this requires some extra
>> hoop-jumping to safely and efficiently use it without breaking support
>> for older platforms I suggest that we start with just switching over to
>> GetSystemTimeAsFileTime, which has been supported since Windows 2000.
>> Then more precise time capture can be added in a later patch.

> That will presumably breaK XP.

Yes, and Windows 7. But this patch doesn't to that, it just makes
adjustments that make it easier.

The next step is to use LoadLibrary and GetProcAddress to resolve
GetSystemTimePreciseAsFileTime *if it is available*, during backend
start. Then use it if possible, and fall back to GetSystemTimeAsFileTime
if it isn't.

This patch does not introduce any BC changes. At all. I should've
omitted all mention of the next step I want to take, but I thought it
was a useful explanation of why this change makes a bigger improvement
easier.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2014-09-18 03:39:43 Re: [Windows,PATCH] Use faster, higher precision timer API
Previous Message Jan Wieck 2014-09-18 00:40:51 Re: proposal: plpgsql - Assert statement