Back-port fix for accumulation of parallel worker instrumentation.
authorRobert Haas <rhaas@postgresql.org>
Tue, 19 Dec 2017 17:21:56 +0000 (12:21 -0500)
committerRobert Haas <rhaas@postgresql.org>
Thu, 4 Jan 2018 17:46:00 +0000 (12:46 -0500)
commit2157a61b5aa3805a9e0fb11fa2fd4da9ca54234c
treed9c47ee86312cf1cc728abcec37ce670e73c2b64
parentb64d6c9341522e89f30beecc72ce8859afd8b6c9
Back-port fix for accumulation of parallel worker instrumentation.

When a Gather or Gather Merge node is started and stopped multiple
times, accumulate instrumentation data only once, at the end, instead
of after each execution, to avoid recording inflated totals.

This is a back-port of commit 8526bcb2df76d5171b4f4d6dc7a97560a73a5eff
by Amit Kapila.

Discussion: http://postgr.es/m/20171127175631.GA405@depesz.com
Discussion: http://postgr.es/m/CAA4eK1KT3BYj50qWhK5qBF=LDzQCoUVSFZjcK3mHoJJeWA+fNA@mail.gmail.com
src/backend/executor/execParallel.c
src/test/regress/expected/select_parallel.out
src/test/regress/sql/select_parallel.sql