Remove the CheckpointStartLock in favor of having backends show whether they
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 3 Apr 2007 16:34:36 +0000 (16:34 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 3 Apr 2007 16:34:36 +0000 (16:34 +0000)
commit8522c57a1daf606d9f956aa55976099b1a250e80
treebb25f0ebf9f5644f0e95c5e5053422ea1686c22f
parent789300ab2a94db5894b27d202a5b70849294b42d
Remove the CheckpointStartLock in favor of having backends show whether they
are in their commit critical sections via flags in the ProcArray.  Checkpoint
can watch the ProcArray to determine when it's safe to proceed.  This is
a considerably better solution to the original problem of race conditions
between checkpoint and transaction commit: it speeds up commit, since there's
one less lock to fool with, and it prevents the problem of checkpoint being
delayed indefinitely when there's a constant flow of commits.  Heikki, with
some kibitzing from Tom.
src/backend/access/transam/twophase.c
src/backend/access/transam/xact.c
src/backend/access/transam/xlog.c
src/backend/storage/ipc/procarray.c
src/backend/storage/lmgr/proc.c
src/include/storage/lwlock.h
src/include/storage/proc.h
src/include/storage/procarray.h