diff --git a/src/gausskernel/storage/access/transam/double_write.cpp b/src/gausskernel/storage/access/transam/double_write.cpp index e9e52ad91410c30c0d56e68d1c56abf9b6a5452b..7bc36ff95a3a88b579319b108157d36814ff9620 100644 --- a/src/gausskernel/storage/access/transam/double_write.cpp +++ b/src/gausskernel/storage/access/transam/double_write.cpp @@ -795,7 +795,11 @@ static bool dw_batch_file_recycle(dw_batch_file_context *cxt, uint16 pages_to_wr wait_dw_page_finish_flush(cxt->id); } - PageWriterSync(); + if (USE_CKPT_THREAD_SYNC) { + ProcessSyncRequests(); + } else { + PageWriterSync(); + } if (trunc_file) { if (!LWLockConditionalAcquire(cxt->flush_lock, LW_EXCLUSIVE)) {