设置ImmediateInterruptOK确保WLM线程在PQconnect无响应时也能正常被关闭
This commit is contained in:
@ -1880,8 +1880,12 @@ void WLMReadjustUserSpaceByQuery(const char* username, List* database_name_list)
|
||||
isFirstDb ? "true" : "false");
|
||||
securec_check_ss(rc, "\0", "\0");
|
||||
isFirstDb = false;
|
||||
|
||||
bool old = t_thrd.int_cxt.ImmediateInterruptOK;
|
||||
/*Allow cancel/die interrupts because the connection might be stucked forever*/
|
||||
t_thrd.int_cxt.ImmediateInterruptOK = true;
|
||||
CHECK_FOR_INTERRUPTS();
|
||||
pgConn = PQconnectdb(conninfo);
|
||||
t_thrd.int_cxt.ImmediateInterruptOK = old;
|
||||
if (PQstatus(pgConn) != CONNECTION_OK) {
|
||||
ereport(WARNING,
|
||||
(errcode(ERRCODE_CONNECTION_TIMED_OUT),
|
||||
|
Reference in New Issue
Block a user