pgsql: Relax the requirement that all lwlocks be stored in a single arr - Mailing list pgsql-committers

From Robert Haas
Subject pgsql: Relax the requirement that all lwlocks be stored in a single arr
Date
Msg-id E1W7orz-0002ah-OA@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/ea9df812d8502fff74e7bc37d61bdc7d66d77a7f

Modified Files
--------------
contrib/pg_buffercache/pg_buffercache_pages.c   |    4 +-
contrib/pg_stat_statements/pg_stat_statements.c |    2 +-
doc/src/sgml/monitoring.sgml                    |   44 +--
src/backend/access/transam/slru.c               |    8 +-
src/backend/postmaster/postmaster.c             |    9 +-
src/backend/storage/buffer/bufmgr.c             |    8 +-
src/backend/storage/ipc/ipci.c                  |    3 +-
src/backend/storage/lmgr/lock.c                 |   34 +-
src/backend/storage/lmgr/lwlock.c               |  401 ++++++++++++++---------
src/backend/storage/lmgr/predicate.c            |   35 +-
src/backend/storage/lmgr/proc.c                 |   11 +-
src/backend/utils/probes.d                      |   17 +-
src/include/access/slru.h                       |    6 +-
src/include/storage/buf_internals.h             |    9 +-
src/include/storage/lock.h                      |    6 +-
src/include/storage/lwlock.h                    |  230 +++++++++----
src/include/storage/proc.h                      |    2 +-
src/tools/pgindent/typedefs.list                |    1 -
18 files changed, 518 insertions(+), 312 deletions(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: pgsql: Check dup2() results in syslogger
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Check dup2() results in syslogger