pgsql: Relax the requirement that all lwlocks be stored in a single arr

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Relax the requirement that all lwlocks be stored in a single arr
Date: 2014-01-27 16:17:07
Message-ID: E1W7orz-0002ah-OA@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-01-27 16:49:54 Re: pgsql: Check dup2() results in syslogger
Previous Message Heikki Linnakangas 2014-01-27 15:41:30 Re: pgsql: Check dup2() results in syslogger