Masahiko Sawada <sawada.m...@gmail.com> writes: > I think that to decide which deleted tuples must be preserved we don't > need to care about backend PGXACT.xid but must care about PGXACT.xmin.
Surely this is wrong? Assume that the XID in question is the oldest one visible in the ProcArray (if it isn't, the question is moot anyway). If we ignore it while setting VACUUM's cutoff, then if we come to a tuple bearing that XID, we will think the transaction involved is aborted (since it's not marked as committed) and proceed to remove the tuple. As Amit remarks, the fact that that XID will constrain the XMINs of other open transactions means you'd usually not get any win anyway. But AFAICS, this proposal is incorrect even without that. regards, tom lane