postgres/src/backend/access
Andres Freund 3baae90013 bufmgr: fewer calls to BufferDescriptorGetContentLock
We're planning to merge buffer content locks into BufferDesc.state. To reduce
the size of that patch, centralize calls to BufferDescriptorGetContentLock().

The biggest part of the change is in assertions, by introducing
BufferIsLockedByMe[InMode]() (and removing BufferIsExclusiveLocked()). This
seems like an improvement even without aforementioned plans.

Additionally replace some direct calls to LWLockAcquire() with calls to
LockBuffer().

Reviewed-by: Matthias van de Meent <boekewurm+postgres@gmail.com>
Discussion: https://postgr.es/m/fvfmkr5kk4nyex56ejgxj3uzi63isfxovp2biecb4bspbjrze7@az2pljabhnff
2025-10-08 16:06:19 -04:00
..
brin Don't include execnodes.h in brin.h or gin.h 2025-10-05 17:35:25 +02:00
common Don't include access/htup_details.h in executor/tuptable.h 2025-10-05 18:00:38 +02:00
gin Avoid unnecessary GinFormTuple() calls for incompressible posting lists. 2025-10-06 14:02:01 -07:00
gist Silence compiler warnings on clang 21 2025-09-12 07:28:32 +02:00
hash Remove unneeded casts of BufferGetPage() result 2025-08-29 07:18:29 +02:00
heap bufmgr: fewer calls to BufferDescriptorGetContentLock 2025-10-08 16:06:19 -04:00
index Remove PointerIsValid() 2025-09-24 15:17:20 +02:00
nbtree Improve stability of btree page split on ERRORs 2025-09-26 08:41:06 +09:00
rmgrdesc Improve description of some WAL records for GIN 2025-10-08 14:02:26 +09:00
sequence Update copyright for 2025 2025-01-01 11:21:55 -05:00
spgist Remove unneeded casts of BufferGetPage() result 2025-08-29 07:18:29 +02:00
table Update some more forward declarations to use typedef 2025-09-25 14:33:19 +02:00
tablesample Update copyright for 2025 2025-01-01 11:21:55 -05:00
transam bufmgr: fewer calls to BufferDescriptorGetContentLock 2025-10-08 16:06:19 -04:00
Makefile Introduce sequence_*() access functions 2024-02-26 16:04:59 +09:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00