]> granicus.if.org Git - postgresql/commit
Tighten up application of parallel mode checks.
authorRobert Haas <rhaas@postgresql.org>
Fri, 16 Oct 2015 13:59:57 +0000 (09:59 -0400)
committerRobert Haas <rhaas@postgresql.org>
Fri, 16 Oct 2015 13:59:57 +0000 (09:59 -0400)
commit94b4f7e2a635c3027a23b07086f740615b56aa64
tree5f264bcd1859ab678ea5f0b90b33d02112ce4474
parent423ec0877ff29bc78e48e50362dbcde351a1f025
Tighten up application of parallel mode checks.

Commit 924bcf4f16d54c55310b28f77686608684734f42 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().
src/backend/access/transam/xact.c