Fix crash during upgrade from 5.2 to 6.2

This commit fixes the problem where we incorrectly try to reach distributed table
cache when the extension is not loaded completely. We tried to reach the cache
because we wanted to get reference table information to activate the node. However
it is actually not necessary to explicitly activate the nodes which come from
master_initialize_node_metadata. Because it only runs during extension creation and
at that time there are no reference tables and all nodes are considered as active.
pull/1492/head
Burak Yucesoy 2017-05-18 20:42:14 +03:00
parent 062734a6f5
commit cf4592ce28
1 changed files with 1 additions and 2 deletions

View File

@ -274,7 +274,6 @@ master_initialize_node_metadata(PG_FUNCTION_ARGS)
workerNode->workerRack, false, workerNode->isActive,
&nodeAlreadyExists);
ActivateNode(workerNode->workerName, workerNode->workerPort);
}
PG_RETURN_BOOL(true);
@ -1045,7 +1044,7 @@ ParseWorkerNodeFileAndRename()
strlcpy(workerNode->workerRack, nodeRack, WORKER_LENGTH);
workerNode->workerPort = nodePort;
workerNode->hasMetadata = false;
workerNode->isActive = false;
workerNode->isActive = true;
workerNodeList = lappend(workerNodeList, workerNode);
}