pgsql: Prohibit parallel query when the isolation level is serializable

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Prohibit parallel query when the isolation level is serializable
Date: 2015-10-16 16:03:24
Message-ID: E1Zn7TY-0001vL-6a@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Prohibit parallel query when the isolation level is serializable.

In order for this to be safe, the code which hands true serializability
will need to taught that the SIRead locks taken by a parallel worker
pertain to the same transaction as those taken by the parallel leader.
Some further changes may be needed as well. Until the necessary
adaptations are made, don't generate parallel plans in serializable
mode, and if a previously-generated parallel plan is used after
serializable mode has been activated, run it serially.

This fixes a bug in commit 7aea8e4f2daa4b39ca9d1309a0c4aadb0f7ed81b.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/a53c06a13eb4669d08ce8a5199aee51f88dd453e

Modified Files
--------------
src/backend/access/transam/parallel.c | 8 ++++++++
src/backend/optimizer/plan/planner.c | 10 ++++++++++
2 files changed, 18 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2015-10-16 18:10:45 pgsql: Remove cautions about using volatile from spin.h.
Previous Message Robert Haas 2015-10-16 15:56:41 pgsql: Rewrite interaction of parallel mode with parallel executor supp