pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: bufmgr: Change BufferDesc.state to be a 64-bit atomic
Date: Thu, 15 Jan 2026 19:28:47 +0000
Message-ID: <E1vgT1S-000fPY-32@gemulon.postgresql.org> (raw)

bufmgr: Change BufferDesc.state to be a 64-bit atomic

This is motivated by wanting to merge buffer content locks into
BufferDesc.state in a future commit, rather than having a separate lwlock (see
commit c75ebc657ff for more details). As this change is rather mechanical, it
seems to make sense to split it out into a separate commit, for easier review.

Reviewed-by: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/fvfmkr5kk4nyex56ejgxj3uzi63isfxovp2biecb4bspbjrze7@az2pljabhnff

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/dac328c8a682d38b509b8fd966b280c5f47ea287

Modified Files
--------------
contrib/pg_buffercache/pg_buffercache_pages.c |   8 +-
contrib/pg_prewarm/autoprewarm.c              |   2 +-
src/backend/storage/buffer/buf_init.c         |   2 +-
src/backend/storage/buffer/bufmgr.c           | 170 +++++++++++++-------------
src/backend/storage/buffer/freelist.c         |  24 ++--
src/backend/storage/buffer/localbuf.c         |  72 +++++------
src/include/storage/buf_internals.h           |  51 ++++----
src/include/storage/procnumber.h              |  14 +--
src/test/modules/test_aio/test_aio.c          |  12 +-
9 files changed, 179 insertions(+), 176 deletions(-)



Message-ID: <E1vgT1S-000fPY-32@gemulon.postgresql.org>
Permalink:  ../E1vgT1S-000fPY-32@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vgT1S-000fPY-32@gemulon.postgresql.org

 · 

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: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: bufmgr: Change BufferDesc.state to be a 64-bit atomic
  In-Reply-To: <E1vgT1S-000fPY-32@gemulon.postgresql.org>

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

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