Track partition key for adaptive executor in CitusEndScan

pull/2812/head
Marco Slot 2019-06-29 21:37:15 +02:00
parent 40da78c6fd
commit 70c0d96507
1 changed files with 2 additions and 1 deletions

View File

@ -357,7 +357,8 @@ CitusEndScan(CustomScanState *node)
/* queryId is not set if pg_stat_statements is not installed */ /* queryId is not set if pg_stat_statements is not installed */
if (queryId != 0) if (queryId != 0)
{ {
if (executorType == MULTI_EXECUTOR_ROUTER && partitionKeyConst != NULL) if (partitionKeyConst != NULL && (executorType == MULTI_EXECUTOR_ROUTER ||
executorType == MULTI_EXECUTOR_ADAPTIVE))
{ {
partitionKeyString = DatumToString(partitionKeyConst->constvalue, partitionKeyString = DatumToString(partitionKeyConst->constvalue,
partitionKeyConst->consttype); partitionKeyConst->consttype);