Re: Slow standby snapshot - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: Slow standby snapshot
Date
Msg-id CAPpHfdvwceRC3YrATakUdYqvJLiFf1tOwvvo6-Dpq==AHwvQkg@mail.gmail.com
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 Wed, Nov 10, 2021 at 12:16 AM Michail Nikolaev
<michail.nikolaev@gmail.com> wrote:
> I updated the patch a little. KnownAssignedXidsGetAndSetXmin now
> causes fewer cache misses because some values are stored in variables
> (registers). I think it is better to not lean on the compiler here
> because of `volatile` args.
> Also, I have added some comments.

It looks like KnownAssignedXidsNext doesn't have to be
pg_atomic_uint32.  I see it only gets read with pg_atomic_read_u32()
and written with pg_atomic_write_u32().  Existing code believes that
read/write of 32-bit values is atomic.  So, you can use just uint32
instead of pg_atomic_uint32.

------
Regards,
Alexander Korotkov



pgsql-hackers by date:

Previous
From: "houzj.fnst@fujitsu.com"
Date:
Subject: RE: Data is copied twice when specifying both child and parent table in publication
Next
From: Justin Pryzby
Date:
Subject: Re: Add psql command to list constraints