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

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 (view raw or flat)
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

pgsql-hackers by date

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

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