Relax the requirement that all lwlocks be stored in a single array.
authorRobert Haas <rhaas@postgresql.org>
Mon, 27 Jan 2014 16:07:44 +0000 (11:07 -0500)
committerRobert Haas <rhaas@postgresql.org>
Mon, 27 Jan 2014 16:07:44 +0000 (11:07 -0500)
commitea9df812d8502fff74e7bc37d61bdc7d66d77a7f
tree7e138cbe713ccbf24c3be5603bcc84cae1f3079e
parentf62eba204f367acbfea7e63991524bf981b307f8
Relax the requirement that all lwlocks be stored in a single array.

This makes it possible to store lwlocks as part of some other data
structure in the main shared memory segment, or in a dynamic shared
memory segment.  There is still a main LWLock array and this patch does
not move anything out of it, but it provides necessary infrastructure
for doing that in the future.

This change is likely to increase the size of LWLockPadded on some
platforms, especially 32-bit platforms where it was previously only
16 bytes.

Patch by me.  Review by Andres Freund and KaiGai Kohei.
18 files changed:
contrib/pg_buffercache/pg_buffercache_pages.c
contrib/pg_stat_statements/pg_stat_statements.c
doc/src/sgml/monitoring.sgml
src/backend/access/transam/slru.c
src/backend/postmaster/postmaster.c
src/backend/storage/buffer/bufmgr.c
src/backend/storage/ipc/ipci.c
src/backend/storage/lmgr/lock.c
src/backend/storage/lmgr/lwlock.c
src/backend/storage/lmgr/predicate.c
src/backend/storage/lmgr/proc.c
src/backend/utils/probes.d
src/include/access/slru.h
src/include/storage/buf_internals.h
src/include/storage/lock.h
src/include/storage/lwlock.h
src/include/storage/proc.h
src/tools/pgindent/typedefs.list