Re: What is a typical precision of gettimeofday()? - Mailing list pgsql-hackers

From Andrey M. Borodin
Subject Re: What is a typical precision of gettimeofday()?
Date
Msg-id 212C2E24-32CF-400E-982E-A446AB21E8CC@yandex-team.ru
Whole thread Raw
In response to Re: What is a typical precision of gettimeofday()?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: What is a typical precision of gettimeofday()?
Re: What is a typical precision of gettimeofday()?
List pgsql-hackers

> On 2 Jul 2024, at 22:20, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> It sure looks like this is exact-to-the-nanosecond results,
> since the modal values match the overall per-loop timing,
> and there are no zero measurements.

That’s a very interesting result, from the UUID POV!
If time is almost always advancing, using time readings instead of a counter is very reasonable: we have interprocess
monotonicityalmost for free. 
Though time is advancing in a very small steps… RFC assumes that we use microseconds, I’m not sure it’s ok to use 10
morebits for nanoseconds… 

Thanks!


Best regards, Andrey Borodin.


pgsql-hackers by date:

Previous
From: shveta malik
Date:
Subject: Re: Conflict Detection and Resolution
Next
From: Amit Kapila
Date:
Subject: Re: speed up a logical replica setup