!941 [Lightweight PR]: Fix free dirty_page_queue

Merge pull request !941 from TotaJ/N/A
This commit is contained in:
opengauss-bot 2021-04-30 16:46:42 +08:00 committed by Gitee
commit e7bdddbfb7
1 changed files with 4 additions and 2 deletions

View File

@ -10536,8 +10536,10 @@ void ShutdownXLOG(int code, Datum arg)
/* Shutdown all the page writer threads. */
ckpt_shutdown_bgwriter();
ckpt_shutdown_pagewriter();
free(g_instance.ckpt_cxt_ctl->dirty_page_queue);
g_instance.ckpt_cxt_ctl->dirty_page_queue = NULL;
if (g_instance.ckpt_cxt_ctl->dirty_page_queue != NULL) {
pfree(g_instance.ckpt_cxt_ctl->dirty_page_queue);
g_instance.ckpt_cxt_ctl->dirty_page_queue = NULL;
}
g_instance.ckpt_cxt_ctl->prune_queue_lock = NULL;
g_instance.ckpt_cxt_ctl->ckpt_redo_state.recovery_queue_lock = NULL;