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

Re: Transaction Snapshot Cloning

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Transaction Snapshot Cloning
Date: 2008-01-20 15:11:28
Message-ID: 87ve5obkgv.fsf@oxford.xeocode.com (view raw or flat)
Thread:
Lists: pgsql-hackers
"Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:

> On Sat, 2008-01-12 at 18:46 +0000, Gregory Stark wrote:
>
>> To do something like that the user would have to create a prepared transaction
>> to save the snapshot. I think that makes sense though since effectively it's
>> just requiring that the user explicitly do what would otherwise be a hidden
>> implicit requirement -- that the user do something to hold globalxmin back to
>> avoid having the snapshots expire.
>
> This is a good idea which I will want to develop in the future, not yet
> though.

I didn't mean this as an additional feature. I'm talking about how users would
use the two very different proposed interfaces.

In your version the user can save the actual snapshot somewhere and then use
it later. He'll presumably get an error if the snapshot is no longer usable
and there's no way for him to protect it and guarantee it's still usable.

In Tom's version the user can only copy the snapshot from some other running
session. It's necessarily still valid because the session is using it. But if
the user wants to save it for later he'll have to create a session (or
prepared transaction) to hold the snapshot.

-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com
  Ask me about EnterpriseDB's RemoteDBA services!

In response to

Responses

pgsql-hackers by date

Next:From: Martijn van OosterhoutDate: 2008-01-20 16:38:46
Subject: Re: SHA1 on postgres 8.3
Previous:From: Simon RiggsDate: 2008-01-20 13:18:04
Subject: Re: Transaction Snapshot Cloning

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