• Robert Haas's avatar
    Tighten up application of parallel mode checks. · 94b4f7e2
    Robert Haas authored
    Commit 924bcf4f failed to enforce
    parallel mode checks during the commit of a parallel worker, because
    we exited parallel mode prior to ending the transaction so that we
    could pop the active snapshot.  Re-establish parallel mode during
    parallel worker commit.  Without this, it's far too easy for unsafe
    actions during the pre-commit sequence to crash the server instead of
    hitting the error checks as intended.
    
    Just to be extra paranoid, adjust a couple of the sanity checks in
    xact.c to check not only IsInParallelMode() but also
    IsParallelWorker().
    94b4f7e2
xact.c 155 KB