Re: Fix for typo in UUIDv7 timestamp extraction

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Erik Nordström <erik(at)tigerdata(dot)com>
Cc: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix for typo in UUIDv7 timestamp extraction
Date: 2025-08-15 19:01:14
Message-ID: CAD21AoDEyapbZzn_zzU==DDcEJxpdE6zTpCyFdJyicBqbp15EA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 15, 2025 at 11:44 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>
> On Thu, Aug 14, 2025 at 5:10 AM Erik Nordström <erik(at)tigerdata(dot)com> wrote:
> >
> >
> >
> > On Wed, Aug 13, 2025 at 11:52 AM Andrey Borodin <x4mmm(at)yandex-team(dot)ru> wrote:
> >>
> >> Hi Erik!
> >>
> >> > On 13 Aug 2025, at 11:05, Erik Nordström <erik(at)tigerdata(dot)com> wrote:
> >> >
> >> > I think I found a small typo in the function that extracts a timestamp from a UUIDv7 (uuid_extract_timestamp). Unless I am mistaken, the constant US_PER_MS should be used instead of NS_PER_US when converting milliseconds to microseconds. Fortunately, these constants are the same so the calculation is still correct.
> >>
> >> Wow, that's a very good level of proofreading! Yes, you are correct, it's must be US_PER_MS.
> >>
> >> >
> >> > Anyway, attaching a patch to fix this typo.
> >>
> >> LGTM.
> >
> >
> > Ok, maybe a committer would like to commit this change immediately?
>
> Thank you for the report! I'll push the patch to master and v18 shortly.

Pushed.

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2025-08-15 19:03:41 Re: Add CHECK_FOR_INTERRUPTS in pg_buffercache_pages while scanning the buffers
Previous Message Nathan Bossart 2025-08-15 18:46:39 Re: shmem_startup_hook called twice on Windows