Fix locking in ReadWorkerNodes()

pull/1453/head
Brian Cloutier 2017-07-04 14:26:01 +03:00 committed by Marco Slot
parent 7ad95b53d2
commit f40f03270a
1 changed files with 2 additions and 2 deletions

View File

@ -470,7 +470,7 @@ ReadWorkerNodes()
List *workerNodeList = NIL; List *workerNodeList = NIL;
TupleDesc tupleDescriptor = NULL; TupleDesc tupleDescriptor = NULL;
Relation pgDistNode = heap_open(DistNodeRelationId(), AccessExclusiveLock); Relation pgDistNode = heap_open(DistNodeRelationId(), AccessShareLock);
scanDescriptor = systable_beginscan(pgDistNode, scanDescriptor = systable_beginscan(pgDistNode,
InvalidOid, false, InvalidOid, false,
@ -488,7 +488,7 @@ ReadWorkerNodes()
} }
systable_endscan(scanDescriptor); systable_endscan(scanDescriptor);
heap_close(pgDistNode, AccessExclusiveLock); heap_close(pgDistNode, NoLock);
return workerNodeList; return workerNodeList;
} }