Craig Ringer <cr...@2ndquadrant.com> writes: > My understanding from reading the above is that Simon didn't propose to > make aborted txns visible, only in-progress uncommitted txns.
Yeah, but an "in-progress uncommitted txn" can become an "aborted txn" at any moment, and there's no interlock that would prevent its generated data from being removed out from under you at any moment after that. So there's a race condition, and as Robert observed, the window isn't necessarily small. > The bigger issue, and the one that IMO makes it impractical to spell this > as "READ UNCOMMITTED", is that an uncommitted txn might've changed the > catalogs so there is no one snapshot that is valid for interpreting all > possible tuples. In theory that should be okay, because any such tuples would be in tables you can't access due to the in-progress txn having taken AccessExclusiveLock on tables it changes the rowtype of. But we keep looking for ways to reduce the locking requirements for ALTER TABLE actions --- and as I said upthread, it feels like this feature might someday be the sole reason why we can't safely reduce lock strength for some form of ALTER. I can't make a concrete argument for that though ... maybe it's not really any worse than the situation just after failure of any DDL-performing txn. But that would bear closer study than I think it's had. > I think the suggestions for a SRF based approach might make sense. Yeah, I'd rather do it that way than via a transaction isolation level. The isolation-level approach seems like people will expect stronger semantics than we could actually provide. regards, tom lane