From e6ebfc1f53fb7c31cb087a6380a361c1b05bcc54 Mon Sep 17 00:00:00 2001 From: Brian Cloutier Date: Thu, 18 Jan 2018 12:09:57 -0800 Subject: [PATCH] Remove VLA from UpdateNodeLocation --- src/backend/distributed/utils/node_metadata.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/backend/distributed/utils/node_metadata.c b/src/backend/distributed/utils/node_metadata.c index c2cb87824..37be1a1e7 100644 --- a/src/backend/distributed/utils/node_metadata.c +++ b/src/backend/distributed/utils/node_metadata.c @@ -501,11 +501,10 @@ static void UpdateNodeLocation(int32 nodeId, char *newNodeName, int32 newNodePort) { const bool indexOK = true; - const int scanKeyCount = 1; Relation pgDistNode = NULL; TupleDesc tupleDescriptor = NULL; - ScanKeyData scanKey[scanKeyCount]; + ScanKeyData scanKey[1]; SysScanDesc scanDescriptor = NULL; HeapTuple heapTuple = NULL; Datum values[Natts_pg_dist_node]; @@ -519,7 +518,7 @@ UpdateNodeLocation(int32 nodeId, char *newNodeName, int32 newNodePort) BTEqualStrategyNumber, F_INT4EQ, Int32GetDatum(nodeId)); scanDescriptor = systable_beginscan(pgDistNode, DistNodeNodeIdIndexId(), indexOK, - NULL, scanKeyCount, scanKey); + NULL, 1, scanKey); heapTuple = systable_getnext(scanDescriptor); if (!HeapTupleIsValid(heapTuple))