Re: synchronized snapshots - Mailing list pgsql-hackers

From Robert Haas
Subject Re: synchronized snapshots
Date
Msg-id CA+TgmobC0YOP9KdAobCn+kV6EvSMQ7YMvYo=zARg758oN73hiw@mail.gmail.com
Whole thread Raw
In response to Re: synchronized snapshots  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
On Mon, Aug 15, 2011 at 3:51 AM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.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


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: SSI error messages
Next
From: Robert Haas
Date:
Subject: Re: VACUUM FULL versus TOAST