Skip site navigation (1) Skip section navigation (2)

Re: Reviewers Guide to DeferredTransactions/TransactionGuarantee

From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Reviewers Guide to DeferredTransactions/TransactionGuarantee
Date: 2007-04-09 06:21:57
Message-ID: 1176099717.3623.717.camel@silverbirch.site (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
On Sun, 2007-04-08 at 17:02 +0100, Simon Riggs wrote:

> My concern was this:
> 
> If we flush the currently outstanding deferred transactions then that
> doesn't guarantee they have all reached the clog. Previously, a deferred
> transaction would not release the CheckpointStartLock until after the
> clog had been updated. 
> 
> If we wait for all currently inCommit transactions to end this will
> cover all deferred transactions also. So I think I just need to flush
> deferred transactions prior to the wait and this will be valid. Would
> you agree?

I'm good with this now, sorry for the noise.

>From the existing code in CreateCheckpoint, just need to add a
background flush immediately prior to the newly added waits. That would
replace what I've got in the current patch where I hold the lock across
the calculation the WAL insert pointer for the checkpoint which was too
safe - there is no need for prior WAL to be flushed at that point.

-- 
  Simon Riggs             
  EnterpriseDB   http://www.enterprisedb.com



In response to

pgsql-hackers by date

Next:From: ITAGAKI TakahiroDate: 2007-04-09 11:01:34
Subject: Re: autovacuum multiworkers, patch 5
Previous:From: ITAGAKI TakahiroDate: 2007-04-09 02:48:44
Subject: Re: UTF8MatchText

pgsql-patches by date

Next:From: ITAGAKI TakahiroDate: 2007-04-09 09:22:12
Subject: Clear up strxfrm() in UTF-8 with locale on Windows
Previous:From: Simon RiggsDate: 2007-04-09 05:56:55
Subject: Re: Minor recovery changes

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group