public inbox for [email protected]  
help / color / mirror / Atom feed
pgsql: Use atomic access for SlruShared->latest_page_number
2+ messages / 1 participants
[nested] [flat]

* pgsql: Use atomic access for SlruShared->latest_page_number
@ 2024-02-06 10:42 Alvaro Herrera <[email protected]>
  2024-02-06 11:05 ` Re: pgsql: Use atomic access for SlruShared->latest_page_number Alvaro Herrera <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Alvaro Herrera @ 2024-02-06 10:42 UTC (permalink / raw)
  To: [email protected]

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: pgsql: Use atomic access for SlruShared->latest_page_number
  2024-02-06 10:42 pgsql: Use atomic access for SlruShared->latest_page_number Alvaro Herrera <[email protected]>
@ 2024-02-06 11:05 ` Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2024-02-06 11:05 UTC (permalink / raw)
  To: [email protected]

On 2024-Feb-06, Alvaro Herrera wrote:

> Use atomic access for SlruShared->latest_page_number

rorqual failed (--disable-atomics --disable-spinlocks).  Looking into it ...

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"Nunca se desea ardientemente lo que solo se desea por razón" (F. Alexandre)






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-02-06 11:05 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-02-06 10:42 pgsql: Use atomic access for SlruShared->latest_page_number Alvaro Herrera <[email protected]>
2024-02-06 11:05 ` Alvaro Herrera <[email protected]>

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