diff --git a/src/gausskernel/process/threadpool/threadpool_stream.cpp b/src/gausskernel/process/threadpool/threadpool_stream.cpp index d87c00fc2..44234a822 100644 --- a/src/gausskernel/process/threadpool/threadpool_stream.cpp +++ b/src/gausskernel/process/threadpool/threadpool_stream.cpp @@ -192,6 +192,9 @@ static void ResetStreamStatus() pfree_ext(t_thrd.log_cxt.msgbuf->data); } + t_thrd.proc->databaseId = InvalidOid; + t_thrd.proc->roleId = InvalidOid; + /* * Reset extended-query-message flag, so that any errors * encountered in "idle" state don't provoke skip.