From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: getting rid of SnapshotNow |
Date: | 2013-07-26 14:16:49 |
Message-ID: | 20130726141649.GA11678@alap2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-odbc |
On 2013-07-26 09:50:32 -0400, Robert Haas wrote:
> sepgsql is using SnapshotSelf to find the old version of a tuple that
> was updated by the core code just before. That should be safe in the
> sense that there can't be a currently-committing transaction somewhere
> else that's updated that tuple, if we know that our own uncommitted
> transaction has done a transactional update. There was a recent
> thread discussing whether another API might be better, and I'd be
> prepared to concede that it might be. But I don't think it's
> drop-dead broken.
It's safe for the tuples updated in that transaction, but it's not safe
to look at anything else if you expect results without the SnapshotNow
problems. E.g. looking at a newly created attribute is fine, but
iterating over all attributes not necessarily.
I am more concerned about the care needed when placing
CommandCounterIncrement()'s somewhere though. It seems more than likely
that this will get repeatedly broken, even if it's not atm (which I
doubt). E.g. inheritance handling seems to be rather wonky WRT this.
> Not that I really object if someone wants to have a go at getting rid
> of SnapshotSelf, but I think it'd be worth articulating what we hope
> to accomplish by so doing.
Agreed. From the internal usages there doesn't seem to be too much
pressure.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2013-07-26 14:47:59 | Re: Condition to become the standby mode. |
Previous Message | Tom Lane | 2013-07-26 14:10:46 | Re: getting rid of SnapshotNow |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2013-07-26 17:45:25 | Re: getting rid of SnapshotNow |
Previous Message | Tom Lane | 2013-07-26 14:10:46 | Re: getting rid of SnapshotNow |