Re: Transaction Snapshot Cloning - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Transaction Snapshot Cloning
Date
Msg-id 200803280236.m2S2aY816209@momjian.us
Whole thread Raw
In response to Re: Transaction Snapshot Cloning  (Chris Browne <cbbrowne@acm.org>)
List pgsql-hackers
Added to TODO:

* Allow one transaction to see tuples using the snapshot of another transaction
 This would assist multiple backends in working together.
http://archives.postgresql.org/pgsql-hackers/2008-01/msg00400.php


---------------------------------------------------------------------------

Chris Browne wrote:
> simon@2ndquadrant.com (Simon Riggs) writes:
> > On Fri, 2008-01-11 at 20:39 +0000, Simon Riggs wrote:
> >> On Fri, 2008-01-11 at 15:05 -0500, Tom Lane wrote:
> >> Simon Riggs <simon@2ndquadrant.com> writes:
> >> > > 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.
> >> > 
> >> > ... whereupon we'd get wrong answers.  Certainly you could not allow
> >> > transaction xmin to go backwards, and I'm not sure what other
> >> > restrictions there would be, but the whole thing gives me the willies.
> >
> > Sorry, forgot to add
> > - global xmin isn't going backwards
> > - neither is latest completed xid
> >
> > The xmin of the transaction will go backwards, but as long as we don't
> > do anything prior to the setting of the cloned snapshot, what can go
> > wrong? :-)
> 
> Note that we required that the "provider transaction" have the
> attributes IsXactIsoLevelSerializable and XactReadOnly both being
> true, so we have the mandates that the resultant backend process:
> 
> a) Is in read only mode, and
> b) Is in serializable mode.
> 
> That's a pair of (possibly stretching-wide!) suspenders worth of
> support from Evil...
> -- 
> (format nil "~S@~S" "cbbrowne" "cbbrowne.com")
> http://linuxfinances.info/info/internet.html
> Trying  to be happy  is like trying to build   a machine for which the
> only specification is that it should run noiselessly.
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [FEATURE REQUEST] Streaming Onlinebackup (Maybe OFFTOPIC)
Next
From: Bruce Momjian
Date:
Subject: Re: proposal for 8.4: PL/pgSQL - statement CASE