mirror of https://github.com/citusdata/citus.git
Fix locking in ReadWorkerNodes()
parent
7ad95b53d2
commit
f40f03270a
|
@ -470,7 +470,7 @@ ReadWorkerNodes()
|
|||
List *workerNodeList = NIL;
|
||||
TupleDesc tupleDescriptor = NULL;
|
||||
|
||||
Relation pgDistNode = heap_open(DistNodeRelationId(), AccessExclusiveLock);
|
||||
Relation pgDistNode = heap_open(DistNodeRelationId(), AccessShareLock);
|
||||
|
||||
scanDescriptor = systable_beginscan(pgDistNode,
|
||||
InvalidOid, false,
|
||||
|
@ -488,7 +488,7 @@ ReadWorkerNodes()
|
|||
}
|
||||
|
||||
systable_endscan(scanDescriptor);
|
||||
heap_close(pgDistNode, AccessExclusiveLock);
|
||||
heap_close(pgDistNode, NoLock);
|
||||
|
||||
return workerNodeList;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue