Use atomic access for SlruShared->latest_page_number

Alvaro Herrera <alvherre@alvh.no-ip.org>

Commit: d172b717c6f436738cc8383a4e9f611ae227fd93
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2024-02-06T09:54:10Z
Releases: 17.0
Use atomic access for SlruShared->latest_page_number

The new concurrency model proposed for slru.c to improve performance
does not include any single lock that would coordinate processes
doing concurrent reads/writes on SlruShared->latest_page_number.
We can instead use atomic reads and writes for that variable.

Author: Dilip Kumar <dilipbalaut@gmail.com>
Reviewed-by: Andrey M. Borodin <x4mmm@yandex-team.ru>
Discussion: https://postgr.es/m/CAFiTN-vzDvNz=ExGXz6gdyjtzGixKSqs0mKHMmaQ8sOSEFZ33A@mail.gmail.com

Files

Discussion