opengauss多线程 会话

PostmasterMain -> initialize_util_thread /

main.cpp main -> PostmasterMain -> ServerLoop -> BackendStartup -> initialize_worker_thread
ThreadPoolWorker::StartUp -> initialize_worker_thread

-> initialize_thread { gs_thread_create } -> InternalThreadFunc -> GetThreadEntry

ServerLoop(void) {
if (threadPoolActivated && !isConnectHaPort)
result = g_threadPoolControler->DispatchSession(port);
else
BackendStartup(port, );
}

ThreadPoolController::DispatchSession(Port *port) -> ThreadPoolSessControl::CreateSession(Port *port) {
create_session_context
}

HandleConnEvent -> ThreadPoolListener::DispatchSession {
->WakeUpToWork(session);
}

ThreadPoolWorker::AttachSessionToThread

free_session_context

会话状态 knl_session_status

你可能感兴趣的:(postgresql)