Fix CheckpointStartLock starvation

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Fix CheckpointStartLock starvation
Date: 2007-04-03 12:49:54
Message-ID: 46124D72.6090601@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On a busy system, checkpoint could be starved while queuing for the
CheckpointStartLock. To avoid that, get rid of CheckpointStartLock and
instead set a flag in PGPROC struct when a commit starts. After
computing the REDO ptr, checkpoint waits for all backends that had that
flag set to finish their commits. This eliminates the same race
condition the CheckpointStartLock was there for, without the risk of
starvation.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

Attachment Content-Type Size
eliminate_checkpointstartlock.patch text/x-diff 17.3 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message David Fetter 2007-04-03 13:29:23 Re: [HACKERS] Arrays of Complex Types
Previous Message Michael Meskes 2007-04-03 12:42:17 Re: ecpg threading vs win32