pgsql: Replace the XLogInsert slots with regular LWLocks. - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Replace the XLogInsert slots with regular LWLocks.
Date
Msg-id E1WR0Cl-0002Sy-7d@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Replace the XLogInsert slots with regular LWLocks.

The special feature the XLogInsert slots had over regular LWLocks is the
insertingAt value that was updated atomically with releasing backends
waiting on it. Add new functions to the LWLock API to do that, and replace
the slots with LWLocks. This reduces the amount of duplicated code.
(There's still some duplication, but at least it's all in lwlock.c now.)

Reviewed by Andres Freund.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/68a2e52bbaf98f136a96b3a0d734ca52ca440a95

Modified Files
--------------
src/backend/access/transam/xlog.c |  821 +++++++++++--------------------------
src/backend/storage/lmgr/lwlock.c |  262 +++++++++++-
src/backend/utils/misc/guc.c      |    6 +-
src/include/access/xlog.h         |    2 +-
src/include/storage/lwlock.h      |    6 +-
5 files changed, 502 insertions(+), 595 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Again fix initialization of auto-tuned effective_cache_size.
Next
From: Bruce Momjian
Date:
Subject: pgsql: Properly check for readdir/closedir() failures