Re: Slow standby snapshot - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: Slow standby snapshot
Date
Msg-id FC9685E6-85FF-4092-9E52-C0F8A2C0D625@yandex-team.ru
Whole thread Raw
In response to Re: Slow standby snapshot  (Michail Nikolaev <michail.nikolaev@gmail.com>)
Responses Re: Slow standby snapshot  (Michail Nikolaev <michail.nikolaev@gmail.com>)
List pgsql-hackers

> On 22 Nov 2021, at 14:05, Michail Nikolaev <michail.nikolaev@gmail.com> wrote:
>
>> Write barrier must be issued after write, not before.
>> Don't we need to issue read barrier too?
>
> The write barrier is issued after the changes to KnownAssignedXidsNext
> and KnownAssignedXidsValid arrays and before the update of
> headKnownAssignedXids.
> So, it seems to be correct. We make sure once the CPU sees changes of
> headKnownAssignedXids - underlying arrays contain all the required
> data.

Patch on barrier seems too complicated to me right now. I’d propose to focus on KnowAssignedXidsNext patch: it’s clean,
simpleand effective. 

I’ve rebased the patch so that it does not depend on previous step. Please check out it’s current state, if you are OK
withit - let’s mark the patch Ready for Committer. Just maybe slightly better commit message would make the patch
easierto understand. 


Thanks! Best regards, Andrey Borodin.

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations
Next
From: Justin Pryzby
Date:
Subject: Re: Adding CI to our tree (ccache)