Re: synchronized snapshots

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Joachim Wieland <joe(at)mcknight(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: synchronized snapshots
Date: 2011-08-15 13:37:54
Message-ID: CA+TgmobC0YOP9KdAobCn+kV6EvSMQ7YMvYo=zARg758oN73hiw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 15, 2011 at 3:51 AM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> It would be nice a symmetry, but you'd need a limitation that
> pg_import_snapshot() must be the first thing you do in the session. And it
> might be hard to enforce that, as once you get control into the function,
> you've already acquired another snapshot in the transaction to run the
> "SELECT pg_import_snapshot()" query with. Specifying the snapshot in the
> BEGIN command makes sense.

+1. Also, I am pretty sure that there are drivers out there, and
connection poolers, that keep track of the transaction state by
watching commands go by. Right now you can tell by the first word of
the command whether it's something that might change the transaction
state; I wouldn't like to make that harder.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-08-15 13:42:05 Re: VACUUM FULL versus TOAST
Previous Message Peter Eisentraut 2011-08-15 12:27:46 Re: SSI error messages