!5898 修复B库并行逻辑解码的core问题
Merge pull request !5898 from chenxiaobin/fixbparalleldecode
This commit is contained in:
@ -1465,6 +1465,8 @@ void PostgresInitializer::InitParallelDecode()
|
||||
|
||||
InitSettings();
|
||||
|
||||
InitExtensionVariable();
|
||||
|
||||
FinishInit();
|
||||
}
|
||||
|
||||
|
||||
@ -7710,6 +7710,11 @@ void LoadSqlPlugin()
|
||||
ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
|
||||
errmsg("Please use the original role to connect B-compatibility database first, to load extension dolphin")));
|
||||
}
|
||||
|
||||
/* Creating extension dolphin must init mask_password_mem_cxt before */
|
||||
Assert(t_thrd.mem_cxt.mask_password_mem_cxt != NULL);
|
||||
Assert(IsNormalProcessingMode());
|
||||
|
||||
/* recheck and load dolphin within lock */
|
||||
t_thrd.utils_cxt.holdLoadPluginLock[DB_CMPT_B] = true;
|
||||
pthread_mutex_lock(&g_instance.loadPluginLock[DB_CMPT_B]);
|
||||
|
||||
@ -1107,6 +1107,10 @@ void ParallelDecodeWorkerMain(void* point)
|
||||
pgstat_report_appname("LogicalDecodeWorker");
|
||||
pgstat_report_activity(STATE_IDLE, NULL);
|
||||
|
||||
#if (!defined(ENABLE_MULTIPLE_NODES)) && (!defined(ENABLE_PRIVATEGAUSS))
|
||||
LoadSqlPlugin();
|
||||
#endif
|
||||
|
||||
t_thrd.utils_cxt.CurrentResourceOwner = ResourceOwnerCreate(NULL, "parallel decoder resource owner",
|
||||
THREAD_GET_MEM_CXT_GROUP(MEMORY_CONTEXT_STORAGE));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user