public inbox for [email protected]  
help / color / mirror / Atom feed
From: Alvaro Herrera <[email protected]>
To: [email protected]
Subject: pgsql: Use atomic access for SlruShared->latest_page_number
Date: Tue, 06 Feb 2024 10:42:09 +0000
Message-ID: <[email protected]> (raw)

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 <[email protected]>
Reviewed-by: Andrey M. Borodin <[email protected]>
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(-)



view thread (2+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgsql: Use atomic access for SlruShared->latest_page_number
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox