Re: Slow standby snapshot - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: Slow standby snapshot
Date
Msg-id D9B97F6D-2674-43CB-BEE2-D4C0C338C40F@yandex-team.ru
Whole thread Raw
In response to Re: Slow standby snapshot  (Michail Nikolaev <michail.nikolaev@gmail.com>)
Responses Re: Slow standby snapshot
List pgsql-hackers

> On 1 Apr 2022, at 04:18, Michail Nikolaev <michail.nikolaev@gmail.com> wrote:
>
> Hello.
>
> Just an updated commit message.

I've looked into v5.

IMO the purpose of KnownAssignedXidsNext would be slightly more obvious if it was named KnownAssignedXidsNextOffset.
Also please consider some editorialisation:
s/high value/big number/g
KnownAssignedXidsNext[] is updating while taking the snapshot. -> KnownAssignedXidsNext[] is updated during taking the
snapshot.
O(N) next call -> amortized O(N) on next call

Is it safe on all platforms to do "KnownAssignedXidsNext[prev] = n;" while only holding shared lock? I think it is, per
Alexander'scomment, but maybe let's document it? 

Thank you!

Thanks! Best regards, Andrey Borodin.


pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: 15beta1 tab completion of extension versions
Next
From: Dilip Kumar
Date:
Subject: Re: making relfilenodes 56 bits