Re: What is a typical precision of gettimeofday()?

Andrey Borodin <x4mmm@yandex-team.ru>

From: "Andrey M. Borodin" <x4mmm@yandex-team.ru>
To: Hannu Krosing <hannuk@google.com>
Cc: Aleksander Alekseev <aleksander@timescale.com>, pgsql-hackers <pgsql-hackers@postgresql.org>, Tom Lane <tgl@sss.pgh.pa.us>, Peter Eisentraut <peter@eisentraut.org>
Date: 2024-07-03T11:46:30Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Force LC_NUMERIC to C while running TAP tests.

  2. Minor tweaks for pg_test_timing.

  3. Change pg_test_timing to measure in nanoseconds not microseconds.


> 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.