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 68DC3743-35B3-48FB-AC78-69B13B8D4526@yandex-team.ru
Whole thread Raw
In response to Re: What is a typical precision of gettimeofday()?  (Hannu Krosing <hannuk@google.com>)
List pgsql-hackers

> On 3 Jul 2024, at 16:29, Hannu Krosing <hannuk@google.com> wrote:
>
> We currently do something similar with OIDs where we just keep
> generating them and then testing for conflicts.
>
> I don't think this is the best way to do it but it mostly works when
> you can actually test for uniqueness, like for example in TOAST or
> system tables.
>
> Not sure this works even reasonably well for UUIDv7.

Uniqueness is ensured with extra 60+ bits of randomness. Timestamp and counter\microseconds are there to promote
sortability(thus ensuring data locality). 


Best regards, Andrey Borodin.


pgsql-hackers by date:

Previous
From: Ranier Vilela
Date:
Subject: Re: Optimize numeric multiplication for one and two base-NBASE digit multiplicands.
Next
From: Aleksander Alekseev
Date:
Subject: Re: What is a typical precision of gettimeofday()?