pgsql: Fix accumulation of parallel worker instrumentation.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix accumulation of parallel worker instrumentation.
Date: 2017-12-05 19:39:29
Message-ID: E1eMJ3x-0003ti-Ds@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix accumulation of parallel worker instrumentation.

When a Gather or Gather Merge node is started and stopped multiple
times, the old code wouldn't reset the shared state between executions,
potentially resulting in dramatically inflated instrumentation data
for nodes beneath it. (The per-worker instrumentation ended up OK,
I think, but the overall totals were inflated.)

Report by hubert depesz lubaczewski. Analysis and fix by Amit Kapila,
reviewed and tweaked a bit by me.

Discussion: http://postgr.es/m/20171127175631.GA405@depesz.com

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/778e78ae9fa51e58f41cbdc72b293291d02d8984

Modified Files
--------------
src/backend/executor/execParallel.c | 51 ++++++++++++++++++++-------
src/test/regress/expected/select_parallel.out | 21 +++++++++++
src/test/regress/sql/select_parallel.sql | 7 ++++
3 files changed, 66 insertions(+), 13 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2017-12-05 19:45:59 Re: pgsql: PL/Python: Fix potential NULL pointer dereference
Previous Message Peter Eisentraut 2017-12-05 19:16:59 Re: pgsql: PL/Python: Fix potential NULL pointer dereference