diff --git a/src/gausskernel/process/job/job_scheduler.cpp b/src/gausskernel/process/job/job_scheduler.cpp index fc0a98422..e7e651038 100755 --- a/src/gausskernel/process/job/job_scheduler.cpp +++ b/src/gausskernel/process/job/job_scheduler.cpp @@ -201,9 +201,6 @@ NON_EXEC_STATIC void JobScheduleMain() /* Initialize openGauss with DEFAULT_DATABASE, since it cannot be dropped */ t_thrd.proc_cxt.PostInit->SetDatabaseAndUser(dbname, InvalidOid, username); t_thrd.proc_cxt.PostInit->InitJobScheduler(); -#if (!defined(ENABLE_MULTIPLE_NODES)) && (!defined(ENABLE_PRIVATEGAUSS)) - LoadSqlPlugin(); -#endif #ifdef PGXC /* PGXC_COORD */ /* diff --git a/src/gausskernel/process/job/job_worker.cpp b/src/gausskernel/process/job/job_worker.cpp index b8784b934..29836e99f 100755 --- a/src/gausskernel/process/job/job_worker.cpp +++ b/src/gausskernel/process/job/job_worker.cpp @@ -314,10 +314,6 @@ void JobExecuteWorkerMain() t_thrd.proc_cxt.PostInit->InitJobExecuteWorker(); t_thrd.proc_cxt.PostInit->GetDatabaseName(u_sess->proc_cxt.MyProcPort->database_name); -#if (!defined(ENABLE_MULTIPLE_NODES)) && (!defined(ENABLE_PRIVATEGAUSS)) - LoadSqlPlugin(); -#endif - #ifdef PGXC /* PGXC_COORD */ /* * Initialize key pair to be used as object id while using advisory lock @@ -356,6 +352,9 @@ void JobExecuteWorkerMain() (void)MemoryContextSwitchTo(t_thrd.mem_cxt.msg_mem_cxt); SetProcessingMode(NormalProcessing); +#if (!defined(ENABLE_MULTIPLE_NODES)) && (!defined(ENABLE_PRIVATEGAUSS)) + LoadSqlPlugin(); +#endif /* execute job procedure */ elog(LOG, "Job is running, worker: %lu, job id: %d", t_thrd.proc_cxt.MyProcPid, job_id); diff --git a/src/gausskernel/process/tcop/postgres.cpp b/src/gausskernel/process/tcop/postgres.cpp index 9f02a0fea..cc39a5a56 100755 --- a/src/gausskernel/process/tcop/postgres.cpp +++ b/src/gausskernel/process/tcop/postgres.cpp @@ -7608,6 +7608,7 @@ void RemoveTempNamespace() #if (!defined(ENABLE_MULTIPLE_NODES)) && (!defined(ENABLE_PRIVATEGAUSS)) #define INITIAL_USER_ID 10 +/* IMPORTANT: load plugin should call after process is normal, cause heap_create_with_catalog will check it */ void LoadSqlPlugin() { if (u_sess->proc_cxt.MyDatabaseId != InvalidOid && DB_IS_CMPT(B_FORMAT) && IsFileExisted(DOLPHIN)) { diff --git a/src/test/subscription/env_utils.sh b/src/test/subscription/env_utils.sh index 356cbc3e1..c0fa037d6 100644 --- a/src/test/subscription/env_utils.sh +++ b/src/test/subscription/env_utils.sh @@ -56,6 +56,7 @@ function wait_for_subscription_sync(){ } function wait_for_catchup(){ + $(exec_sql $1 $2 "checkpoint") target_lsn=$(exec_sql $1 $2 "SELECT pg_current_xlog_location()") max_attempts=20 attempt=0 diff --git a/src/test/subscription/run_check.sh b/src/test/subscription/run_check.sh index 60c50d75d..90f1a8830 100644 --- a/src/test/subscription/run_check.sh +++ b/src/test/subscription/run_check.sh @@ -39,7 +39,7 @@ do printf "%-10s%-10s\n" ".... ok" $interval else printf "%-10s%-10s\n" ".... FAILED" $interval - exit 1 + break fi done @@ -49,4 +49,4 @@ python2 $scripts_dir/pubsub.py -o -d $node_num > $1/results/stop_cluster.log 2>& total_endtime=`date +"%Y-%m-%d %H:%M:%S"` total_endvalue=`date -d "$total_endtime" +%s` printf "all %d tests passed.\n" $count -printf "total time: %ss\n" $(($total_endvalue - $total_startvalue)) \ No newline at end of file +printf "total time: %ss\n" $(($total_endvalue - $total_startvalue))