Gavin Sherry <[EMAIL PROTECTED]> writes: > Jason Godden pointed out some weird savepoint behaviour on IRC and i've > narrowed this down to a simpler case.
The answer turns out to be that GetSnapshotData is miscomputing snapshot xmin and RecentGlobalXmin when inside a subtransaction: it omits our own top transaction ID from the set of open transactions. The presence of the unique index makes a difference because in the unique-index-check code, we check the existing rows using the bogus data, and actually end up concluding that the original rows being updated are globally dead, and marking them so. I'm surprised that we didn't find this one much earlier :-( regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster