!4514 【同步】修复最大可用模式某些场景不生效的问题

Merge pull request !4514 from 胡正超/master
This commit is contained in:
opengauss_bot
2023-12-07 02:47:24 +00:00
committed by Gitee
2 changed files with 5 additions and 1 deletions

View File

@ -397,7 +397,7 @@ void CheckpointerMain(void)
u_sess->attr.attr_storage.CheckPointTimeout = ENABLE_INCRE_CKPT
? u_sess->attr.attr_storage.incrCheckPointTimeout
: u_sess->attr.attr_storage.fullCheckPointTimeout;
most_available_sync = (volatile bool) u_sess->attr.attr_storage.guc_most_available_sync;
/*
* Checkpointer is the last process to shut down, so we ask it to
* hold the keys for a range of other tasks required most of which
@ -740,6 +740,7 @@ void CheckpointWriteDelay(int flags, double progress)
if (t_thrd.checkpoint_cxt.got_SIGHUP) {
t_thrd.checkpoint_cxt.got_SIGHUP = false;
ProcessConfigFile(PGC_SIGHUP);
most_available_sync = (volatile bool)u_sess->attr.attr_storage.guc_most_available_sync;
/* update shmem copies of config variables */
UpdateSharedMemoryConfig();
}

View File

@ -1130,6 +1130,9 @@ static void SyncRepGetNthLatestSyncRecPtr(XLogRecPtr* receivePtr, XLogRecPtr* wr
}
group_len = list_length(stby_list);
if (group_len == 0) {
return;
}
receive_array = (XLogRecPtr*)palloc(sizeof(XLogRecPtr) * group_len);
write_array = (XLogRecPtr*)palloc(sizeof(XLogRecPtr) * group_len);