mirror of https://github.com/citusdata/citus.git
commit
f5a406a23e
|
@ -639,6 +639,7 @@ GetNodeTuple(char *nodeName, int32 nodePort)
|
||||||
ScanKeyData scanKey[scanKeyCount];
|
ScanKeyData scanKey[scanKeyCount];
|
||||||
SysScanDesc scanDescriptor = NULL;
|
SysScanDesc scanDescriptor = NULL;
|
||||||
HeapTuple heapTuple = NULL;
|
HeapTuple heapTuple = NULL;
|
||||||
|
HeapTuple nodeTuple = NULL;
|
||||||
|
|
||||||
ScanKeyInit(&scanKey[0], Anum_pg_dist_node_nodename,
|
ScanKeyInit(&scanKey[0], Anum_pg_dist_node_nodename,
|
||||||
BTEqualStrategyNumber, F_TEXTEQ, CStringGetTextDatum(nodeName));
|
BTEqualStrategyNumber, F_TEXTEQ, CStringGetTextDatum(nodeName));
|
||||||
|
@ -654,10 +655,12 @@ GetNodeTuple(char *nodeName, int32 nodePort)
|
||||||
nodeName, nodePort)));
|
nodeName, nodePort)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nodeTuple = heap_copytuple(heapTuple);
|
||||||
|
|
||||||
systable_endscan(scanDescriptor);
|
systable_endscan(scanDescriptor);
|
||||||
heap_close(pgDistNode, AccessShareLock);
|
heap_close(pgDistNode, AccessShareLock);
|
||||||
|
|
||||||
return heapTuple;
|
return nodeTuple;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue