Re: synchronized snapshots - Mailing list pgsql-hackers

From Andres Freund
Subject Re: synchronized snapshots
Date
Msg-id 1432128.baSlv4axZa@alap2
Whole thread Raw
In response to Re: synchronized snapshots  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On Monday, August 15, 2011 08:40:34 Simon Riggs wrote:
> On Mon, Aug 15, 2011 at 2:31 AM, Joachim Wieland <joe@mcknight.de> wrote:
> > In short, this is how it works:
> > 
> > SELECT pg_export_snapshot();
> >  pg_export_snapshot
> > --------------------
> >  000003A1-1
> > (1 row)
> > 
> > 
> > (and then in a different session)
> > 
> > BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ (SNAPSHOT =
> > '000003A1-1');
> I don't see the need to change the BEGIN command, which is SQL
> Standard. We don't normally do that.
Uhm. There already are several extensions to begin transaction. Like the just 
added "DEFERRABLE".

> If we have pg_export_snapshot() why not pg_import_snapshot() as well?
Using BEGIN has the advantage of making it explicit that it cannot be used 
inside an existing transaction. Which I do find advantageous.

Andres


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: synchronized snapshots
Next
From: Jun Ishiduka
Date:
Subject: Re: Online base backup from the hot-standby