fixed ccdbdaa from https://gitee.com/opengauss/openGauss-server/pulls/4399
Fix initdb with B db bug.
This commit is contained in:
@ -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 */
|
||||
/*
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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)) {
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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))
|
||||
printf "total time: %ss\n" $(($total_endvalue - $total_startvalue))
|
||||
|
||||
Reference in New Issue
Block a user