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(-)