• A
    HeapTupleSatisfiesVacuum consider also distributedXmin. · 0d7839d7
    Ashwin Agrawal 提交于
    Vacuum now uses distributed lowest dxid to decide oldest transaction *globally*
    running in cluster to make sure tuple is DEAD globally before removing the
    same. HeapTupleSatisfiesVacuum() consults distributed snapshot by reverse
    mapping localXid to distributed xid to check xminAllDistributedSnapshots and
    verifies its not needed anymore globally. Note the check is conservative from
    perpective if cannot check against distributed snapshot (like utility mode
    vacuum) will try to keep the tuple than prematurely getting rid of it and
    suffering the same problem.
    
    This fixes the problem of not removing the tuple still needed. Earlier it
    performed the check just based on local information (oldestXmin) on a segment,
    and hence may cleanup a tuple visible to a distributed query yet to reach the
    segment, which breaks snapshot isolation.
    
    Fixes #801.
    0d7839d7
cdbdistributedsnapshot.c 10.9 KB