Fix IndexOnlyScan counter for heap fetches in parallel mode

Alvaro Herrera <alvherre@alvh.no-ip.org>

Commit: 15a8f8caad14c1f85b23d97842d0c27b106cc10e
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2018-04-10T18:56:15Z
Releases: 11.0
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

Files

Discussion