]> granicus.if.org Git - postgresql/commit
Fix accumulation of parallel worker instrumentation.
authorRobert Haas <rhaas@postgresql.org>
Tue, 5 Dec 2017 19:35:42 +0000 (14:35 -0500)
committerRobert Haas <rhaas@postgresql.org>
Tue, 5 Dec 2017 19:35:42 +0000 (14:35 -0500)
commit778e78ae9fa51e58f41cbdc72b293291d02d8984
tree0ed3b8ba40f80b4ac6fa8909f9e49d1d944cd90f
parentff1473078d2523fa5af7d678dcb4002d9e7f32bd
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
src/backend/executor/execParallel.c
src/test/regress/expected/select_parallel.out
src/test/regress/sql/select_parallel.sql