• Tom Lane's avatar
    Fix TwoPhaseGetDummyBackendId(). · db108349
    Tom Lane authored
    This was broken in commit ed0b409d,
    which revised the GlobalTransactionData struct to not include the
    associated PGPROC as its first member, but overlooked one place where
    a cast was used in reliance on that equivalence.
    
    The most effective way of fixing this seems to be to create a new function
    that looks up the GlobalTransactionData struct given the XID, and make
    both TwoPhaseGetDummyBackendId and TwoPhaseGetDummyProc rely on that.
    
    Per report from Robert Ross.
    db108349
twophase.c 58.5 KB