Kevin Grittner <kgri...@ymail.com> writes: > Why? This "fix" might not deal with the bigger issues that I > discussed, like that the later-to-start and > later-to-acquire-a-snapshot transaction might logically be first in > the apparent order of execution. You can't "fix" that without a > lot of blocking -- that most of us don't want. Depending on *why* > they think this is important, they might need to be acquiring > various locks to prevent behavior they don't want, in which case > having acquired a snapshot at BEGIN would be exactly the *wrong* > thing to do. The exact nature of the problem we're trying to solve > here does matter.
Another thing that I think hasn't been mentioned in this thread is that we used to have severe problems with client libraries that like to issue BEGIN and then go idle until they have something to do. Which, for some reason, is a prevalent behavior. That used to result in problems like VACUUM not being able to clean up dead rows promptly. We fixed that some time ago by making sure we didn't acquire an XID until the first actual statement after BEGIN. Snapshots as such were never a problem for this, because we've never acquired a snapshot immediately at BEGIN ... but if we did so, this problem would come right back. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers