Fix initdb with B db bug.
This commit is contained in:
totaj
2023-11-07 11:52:57 +08:00
committed by pengjiong
parent ef0abc2b6c
commit f8baaa4e54
5 changed files with 7 additions and 9 deletions

View File

@ -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 */
/*

View File

@ -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);

View File

@ -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)) {

View File

@ -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

View File

@ -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))