pgsql: Remove the CheckpointStartLock in favor of having backends show

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Remove the CheckpointStartLock in favor of having backends show
Date: 2007-04-03 16:34:36
Message-ID: 20070403163436.A9FB79FB555@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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.

Modified Files:
--------------
pgsql/src/backend/access/transam:
twophase.c (r1.28 -> r1.29)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/twophase.c.diff?r1=1.28&r2=1.29)
xact.c (r1.238 -> r1.239)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xact.c.diff?r1=1.238&r2=1.239)
xlog.c (r1.266 -> r1.267)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xlog.c.diff?r1=1.266&r2=1.267)
pgsql/src/backend/storage/ipc:
procarray.c (r1.23 -> r1.24)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/ipc/procarray.c.diff?r1=1.23&r2=1.24)
pgsql/src/backend/storage/lmgr:
proc.c (r1.186 -> r1.187)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/lmgr/proc.c.diff?r1=1.186&r2=1.187)
pgsql/src/include/storage:
lwlock.h (r1.34 -> r1.35)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/lwlock.h.diff?r1=1.34&r2=1.35)
proc.h (r1.96 -> r1.97)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/proc.h.diff?r1=1.96&r2=1.97)
procarray.h (r1.12 -> r1.13)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/procarray.h.diff?r1=1.12&r2=1.13)

Browse pgsql-committers by date

  From Date Subject
Next Message James William Pye 2007-04-03 17:11:10 python - fe: Correct the 'port' resolution logic.
Previous Message User H-saito 2007-04-03 16:17:20 psqlodbc - psqlodbc: Snap version is 8.2.0205.