]> granicus.if.org Git - postgresql/commit
Fix IndexOnlyScan counter for heap fetches in parallel mode
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 10 Apr 2018 18:56:15 +0000 (15:56 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 10 Apr 2018 18:56:15 +0000 (15:56 -0300)
commit15a8f8caad14c1f85b23d97842d0c27b106cc10e
tree764375ef544e9c6b7f61c8dcd8b6ba6549f97c97
parent1a40485af6e43be501500a88b1b9765cc0d69c0b
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
src/backend/commands/explain.c
src/backend/executor/instrument.c
src/backend/executor/nodeIndexonlyscan.c
src/backend/executor/nodeModifyTable.c
src/include/executor/instrument.h
src/include/nodes/execnodes.h