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

Re: [PATCHES] Subtransaction commits and Hot Standby

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, List pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [PATCHES] Subtransaction commits and Hot Standby
Date: 2008-09-24 21:44:19
Message-ID: 1222292659.4445.650.camel@ebony.2ndQuadrant (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
On Wed, 2008-09-24 at 13:48 +0100, Simon Riggs wrote:
> On Tue, 2008-09-23 at 22:47 +0100, Simon Riggs wrote:
> 
> > I've tested this some more and am much happier with it now.
> 
> The concept is fine, but I've found a coding bug in further testing.
> Please wait now for new version before review.

OK, spent long time testing various batching scenarios for this using a
custom test harness to simulate various spreads of xids in transaction
trees. All looks fine now.

The main work is done in new clog.c functions:
TransactionIdSetTreeStatus() which sets whole tree atomically by calling
TransactionIdSetPageStatus(), which in turn calls
TransactionIdSetStatusBit() for each xid status change.

TransactionIdSetPageStatus() performs locking and handles write_ok
problem, as did code it replaces. TransactionIdSetPageStatus() is called
theoretical minimum number of times for any transaction tree.

Patch slightly fumbles diff-ing new and replacement code, so there are
two chunks that appear to show I'm removing locking. I'm not!!

Everything else is just API changes.

-- 
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support

Attachment: atomic_subxids.v4.patch
Description: text/x-patch (29.2 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2008-09-24 21:57:41
Subject: Re: Upgrading pgFoundry (Was: Where to Host Project)
Previous:From: Josh BerkusDate: 2008-09-24 21:26:44
Subject: Re: Proposal of SE-PostgreSQL patches (for CommitFest:Sep)

pgsql-patches by date

Next:From: Simon RiggsDate: 2008-09-25 16:27:21
Subject: Re: get_relation_stats_hook()
Previous:From: Simon RiggsDate: 2008-09-24 16:23:38
Subject: Re: hash index improving v3

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