Re: Subtransaction commits and Hot Standby - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Subtransaction commits and Hot Standby
Date
Msg-id 1222206431.4445.493.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: Subtransaction commits and Hot Standby  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: [PATCHES] Subtransaction commits and Hot Standby
List pgsql-hackers
On Thu, 2008-09-18 at 15:59 +0100, Simon Riggs wrote:
> On Tue, 2008-09-16 at 10:11 -0400, Alvaro Herrera wrote:
>
> > I wonder if the improved clog API required to mark multiple
> > transactions as committed at once would be also useful to
> > TransactionIdCommitTree which is used in regular transaction commit.
>
> I've hacked together this concept patch (WIP).
>
> Not fully tested yet, but it gives a flavour of the API rearrangements
> required for atomic clog updates. It passes make check, but that's not
> saying enough for a serious review yet. I expect to pick this up again
> next week.

I've tested this some more and am much happier with it now.
Also added README details; there are no user interface or behaviour
changes.

The patch removes the need for RecordSubTransactionCommit() which

* reduces response times of subtransaction queries because we are able
to apply these changes in batches at commit time. This requires a
batch-style API that now works atomically, so there is much change in
transam.c

* reduces the path length for visibility tests for all users viewing
concurrent subtransaction activity since we are much less likely to
waste time following a long trail to an uncommitted higher-level
transaction

* removes the need for additional WAL logging to implement
subtransaction commits for Hot Standby

So half the patch is refactoring, half rearranging of clog access
functions to support batched-access.

An early review would greatly help my work on Hot Standby. Thanks.

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

Attachment

pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Toasted table not deleted when no out of line columns left
Next
From: Josh Berkus
Date:
Subject: Re: Proposal of SE-PostgreSQL patches (for CommitFest:Sep)