• Tom Lane's avatar
    Redefine IsTransactionState() to only return true for TRANS_INPROGRESS state, · 6d6d14b6
    Tom Lane authored
    which is the only state in which it's safe to initiate database queries.
    It turns out that all but two of the callers thought that's what it meant;
    and the other two were using it as a proxy for "will GetTopTransactionId()
    return a nonzero XID"?  Since it was in fact an unreliable guide to that,
    make those two just invoke GetTopTransactionId() always, then deal with a
    zero result if they get one.
    6d6d14b6
elog.c 54.1 KB