Call the query_info_collect_hook directly if expection happens
GPCC needs that hook, but don't call `mppExecutorCleanup()` since
`queryDesc->estate` is NULL in that case.
@@ -323,7 +323,10 @@ standard_ExecutorStart(QueryDesc *queryDesc, int eflags)
}
PG_CATCH();
{
- mppExecutorCleanup(queryDesc);
+ /* GPDB hook for collecting query info */
+ if (query_info_collect_hook)
+ (*query_info_collect_hook)(QueryCancelCleanup ? METRICS_QUERY_CANCELED : METRICS_QUERY_ERROR, queryDesc);
+
PG_RE_THROW();
}
PG_END_TRY();
