修复query_dop>1时修改外部表导致的宕机问题

This commit is contained in:
vastdata-xyzr
2023-05-25 21:43:43 -04:00
parent 87ab7a22f1
commit 36b94c8a09

View File

@ -8719,20 +8719,16 @@ uint32 getDistSessionKey(List* fdw_private)
uint32 distSessionKey = 0;
foreach (lc, fdw_private) {
#ifdef ENABLE_MOT
/*
* MOT FDW may put a node of any type into the list, so if we are looking for
* FDW may put a node of any type into the list, so if we are looking for
* some specific type, we need to first make sure that it's the correct type.
*/
Node* node = (Node*)lfirst(lc);
if (IsA(node, DefElem)) {
#endif
DefElem* defElem = (DefElem*)lfirst(lc);
if (strcmp("session_key", defElem->defname) == 0)
distSessionKey = intVal(defElem->arg);
#ifdef ENABLE_MOT
}
#endif
}
return distSessionKey;