pgsql: Fix IndexOnlyScan counter for heap fetches in parallel mode

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix IndexOnlyScan counter for heap fetches in parallel mode
Date: 2018-04-10 18:57:26
Message-ID: E1f5ySM-0005B0-Ue@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix IndexOnlyScan counter for heap fetches in parallel mode

The HeapFetches counter was using a simple value in IndexOnlyScanState,
which fails to propagate values from parallel workers; so the counts are
wrong when IndexOnlyScan runs in parallel. Move it to Instrumentation,
like all the other counters.

While at it, change INSERT ON CONFLICT conflicting tuple counter to use
the new ntuples2 instead of nfiltered2, which is a blatant misuse.

Discussion: https://postgr.es/m/20180409215851.idwc75ct2bzi6tea@alvherre.pgsql

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/15a8f8caad14c1f85b23d97842d0c27b106cc10e

Modified Files
--------------
src/backend/commands/explain.c | 10 +++-------
src/backend/executor/instrument.c | 1 +
src/backend/executor/nodeIndexonlyscan.c | 3 +--
src/backend/executor/nodeModifyTable.c | 4 ++--
src/include/executor/instrument.h | 1 +
src/include/nodes/execnodes.h | 7 +++++--
6 files changed, 13 insertions(+), 13 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Pavan Deolasee 2018-04-10 19:07:16 Re: pgsql: Optimize btree insertions for common case of increasing values
Previous Message Alvaro Herrera 2018-04-10 18:32:47 Re: pgsql: Support partition pruning at execution time