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 <[email protected]>
Reviewed-by: Chao Li <[email protected]>
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(-)

Reply via email to