Transaction Snapshot Cloning

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Transaction Snapshot Cloning
Date: 2008-01-11 16:15:06
Message-ID: 1200068106.4266.1131.camel@ebony.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Now that we have a txid_snapshot datatype, it seems easy to imagine that
we might use that to pass snapshot information around between sessions.

If we had a function
replace_serializable_snapshot(master_xid, txid_snapshot)

this would allow us to use the txid_snapshot values to replace our
transaction's serializable snapshot. We would only allow this to execute
when IsXactIsoLevelSerializable and XactReadOnly are true. The
master_xid parameter would be used as a crosscheck to ensure we were
being passed snapshot information about a current transaction on an
active backend, using TransactionIdIsActive(master_xid).

What I'm thinking about is how we might use this to have multiple
sessions working simultaneously on tasks like unloading data, plus its
the first step on the way to running other kinds of parallel operations
as well.

Anything wrong with that idea?

Thanks,

--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas ADI SD 2008-01-11 16:31:14 Re: Dynamic Partitioning using Segment Visibility Maps
Previous Message Tom Lane 2008-01-11 15:41:17 Re: scan.l: check_escape_warning()