summaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeModifyTable.c
diff options
context:
space:
mode:
authorAlvaro Herrera2018-04-10 18:56:15 +0000
committerAlvaro Herrera2018-04-10 18:56:15 +0000
commit15a8f8caad14c1f85b23d97842d0c27b106cc10e (patch)
tree764375ef544e9c6b7f61c8dcd8b6ba6549f97c97 /src/backend/executor/nodeModifyTable.c
parent1a40485af6e43be501500a88b1b9765cc0d69c0b (diff)
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/[email protected]
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
-rw-r--r--src/backend/executor/nodeModifyTable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c
index f47649d0517..543a735be2b 100644
--- a/src/backend/executor/nodeModifyTable.c
+++ b/src/backend/executor/nodeModifyTable.c
@@ -461,7 +461,7 @@ ExecInsert(ModifyTableState *mtstate,
&conflictTid, planSlot, slot,
estate, canSetTag, &returning))
{
- InstrCountFiltered2(&mtstate->ps, 1);
+ InstrCountTuples2(&mtstate->ps, 1);
return returning;
}
else
@@ -476,7 +476,7 @@ ExecInsert(ModifyTableState *mtstate,
*/
Assert(onconflict == ONCONFLICT_NOTHING);
ExecCheckTIDVisible(estate, resultRelInfo, &conflictTid);
- InstrCountFiltered2(&mtstate->ps, 1);
+ InstrCountTuples2(&mtstate->ps, 1);
return NULL;
}
}