Re: CheckpointStartLock starvation - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: CheckpointStartLock starvation
Date
Msg-id 46125BF8.1040303@enterprisedb.com
Whole thread Raw
In response to Re: CheckpointStartLock starvation  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Heikki Linnakangas <heikki@enterprisedb.com> writes:
>> Tom Lane wrote:
>>> Nor will that work for prepared xacts --- you don't want to wait for the
>>> eventual commit, only for PREPARE TRANSACTION to exit its critical
>>> section.
> 
>> PREPARE TRANSACTION wouldn't set the flag in MyProc; there's no clog 
>> changes to protect from at that point. It would be set in 
>> RecordTransactionCommitPrepared when we're really committing. Just like 
>> we use the CheckpointStartLock today.
> 
> Indeed --- you'd better take another look at where we use the
> CheckpointStartLock today.

Yeah, while writing the patch I noticed that we really do use it in 
EndPrepare to avoid a similar race condition with the twophase state file..

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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: CheckpointStartLock starvation
Next
From: "Pavan Deolasee"
Date:
Subject: Plan invalidation