]> granicus.if.org Git - postgresql/commit
Replace the XLogInsert slots with regular LWLocks.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 21 Mar 2014 14:06:08 +0000 (15:06 +0100)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 21 Mar 2014 14:10:48 +0000 (15:10 +0100)
commit68a2e52bbaf98f136a96b3a0d734ca52ca440a95
treebf1d45f3055d659e9df2f1c023ede044078cdb21
parentaf930e606a3217db3909029c6c3f8d003ba70920
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.
src/backend/access/transam/xlog.c
src/backend/storage/lmgr/lwlock.c
src/backend/utils/misc/guc.c
src/include/access/xlog.h
src/include/storage/lwlock.h