Re: Deriving Recovery Snapshots - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Deriving Recovery Snapshots
Date
Msg-id 1224708422.27145.484.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: Deriving Recovery Snapshots  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Deriving Recovery Snapshots
Re: Deriving Recovery Snapshots
List pgsql-hackers
On Wed, 2008-10-22 at 22:38 +0300, Heikki Linnakangas wrote:
> Simon Riggs wrote:
> > If you don't mark subtrans, you will need to keep things in shared
> > memory. I agree you can defer marking subtrans until your shared memory
> > fills, but you will still need to keep track of the parent for each
> > subtransaction until you do. If you don't *know* the parent, how will
> > you do this? You haven't explained how you will write the relationship
> > between a subtransaction and its parent into WAL, for each
> > subtransaction and for an arbitrarily large number of subtransactions.
> 
> I was thinking that it's done in AssignTransactionId(). Similarly to 
> what you're doing in your patch, but instead of just one xid with it's 
> parent, a list of (xid, parent) pairs would be stored in the WAL record.

> Upon replaying that WAL record, those parent-child relationships are 
> recorded in subtrans, and the child xids are removed from UnobservedXids.

But once you reach 64 transactions, you'll need to write an extra WAL
record for every subtransaction, which currently I've managed to avoid.

I understand what you hope to achieve, but right now my focus is on
achieving correctness within next few days, not on reworking parts of
the patch that seem to work correctly and are reasonably well optimised.
We can discuss rework in more detail in a couple of weeks. It's been a
worthwhile discussion, but lets look somewhere else now. I could really
use your help in thinking about prepared transactions.

Forgive me please, I don't wish to be rude, though I probably am.

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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Rework subtransaction commit protocol for hot standby.
Next
From: Simon Riggs
Date:
Subject: Re: [COMMITTERS] pgsql: Rework subtransaction commit protocol for hot standby.