From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Use atomic access for SlruShared->latest_page_number |
Date: | 2024-02-06 10:42:09 |
Message-ID: | E1rXIu1-004vMj-3V@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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(at)gmail(dot)com>
Reviewed-by: Andrey M. Borodin <x4mmm(at)yandex-team(dot)ru>
Discussion: https://postgr.es/m/CAFiTN-vzDvNz=ExGXz6gdyjtzGixKSqs0mKHMmaQ8sOSEFZ33A@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/d172b717c6f436738cc8383a4e9f611ae227fd93
Modified Files
--------------
src/backend/access/transam/clog.c | 6 +-----
src/backend/access/transam/commit_ts.c | 7 +++---
src/backend/access/transam/multixact.c | 28 ++++++++++++++----------
src/backend/access/transam/slru.c | 39 ++++++++++++++++++++++++----------
src/include/access/slru.h | 5 ++++-
5 files changed, 53 insertions(+), 32 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2024-02-06 11:05:01 | Re: pgsql: Use atomic access for SlruShared->latest_page_number |
Previous Message | Ashutosh Bapat | 2024-02-06 09:26:31 | Re: pgsql: Add EXPLAIN (MEMORY) to report planner memory consumption |