From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Cleaning up historical portability baggage |
Date: | 2022-08-08 00:27:27 |
Message-ID: | 295419.1659918447@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
> On Thu, Aug 4, 2022 at 4:09 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> clock_gettime is required by SUSv2 (1997), so I have to admit that
>> macOS 10.4 doesn't have a lot of excuse not to have it. In any case,
>> prairiedog is just sitting there doing its thing until I find cycles
>> to install a newer OS. If you want to move ahead with this, don't
>> let prairiedog block you.
> Thanks, will do.
BTW, that commit really should have updated the explanation at the top of
instr_time.h:
* This file provides an abstraction layer to hide portability issues in
* interval timing. On Unix we use clock_gettime() if available, else
* gettimeofday(). On Windows, gettimeofday() gives a low-precision result
* so we must use QueryPerformanceCounter() instead. These macros also give
* some breathing room to use other high-precision-timing APIs.
Updating the second sentence is easy enough, but as for the third,
I wonder if it's still true in view of 24c3ce8f1. Should we revisit
whether to use gettimeofday vs. QueryPerformanceCounter? At the very
least I suspect it's no longer about "low precision", but about which
API is faster.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Dong Wook Lee | 2022-08-08 03:54:36 | old_snapshot: add test for coverage |
Previous Message | Thomas Munro | 2022-08-07 21:09:53 | Re: logical decoding and replication of sequences |