• Heikki Linnakangas's avatar
    Fix an old bug in multixact and two-phase commit. Prepared transactions can · cd87b6f8
    Heikki Linnakangas authored
    be part of multixacts, so allocate a slot for each prepared transaction in
    the "oldest member" array in multixact.c. On PREPARE TRANSACTION, transfer
    the oldest member value from the current backends slot to the prepared xact
    slot. Also save and recover the value from the 2pc state file.
    
    The symptom of the bug was that after a transaction prepared, a shared lock
    still held by the prepared transaction was sometimes ignored by other
    transactions.
    
    Fix back to 8.1, where both 2PC and multixact were introduced.
    cd87b6f8
twophase_rmgr.c 1.54 KB