Transaction Snapshot Cloning - Mailing list pgsql-hackers

From Simon Riggs
Subject Transaction Snapshot Cloning
Date
Msg-id 1200068106.4266.1131.camel@ebony.site
Whole thread Raw
Responses Re: Transaction Snapshot Cloning  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: scan.l: check_escape_warning()
Next
From: "Zeugswetter Andreas ADI SD"
Date:
Subject: Re: Dynamic Partitioning using Segment Visibility Maps