!1891 修改代码,解决issue --- 关闭增量检查点,开启全页写,无负载情况下,create database花费25秒
Merge pull request !1891 from zhaobingyu/master
This commit is contained in:
@ -3323,6 +3323,9 @@ static void BufferSync(int flags)
|
||||
* Header spinlock is enough to examine BM_DIRTY, see comment in
|
||||
* SyncOneBuffer.
|
||||
*/
|
||||
pg_memory_barrier();
|
||||
buf_state = pg_atomic_read_u32(&buf_desc->state);
|
||||
if ((buf_state & mask) == mask) {
|
||||
buf_state = LockBufHdr(buf_desc);
|
||||
if ((buf_state & mask) == mask) {
|
||||
CkptSortItem *item = NULL;
|
||||
@ -3335,10 +3338,11 @@ static void BufferSync(int flags)
|
||||
item->forkNum = buf_desc->tag.forkNum;
|
||||
item->blockNum = buf_desc->tag.blockNum;
|
||||
}
|
||||
|
||||
UnlockBufHdr(buf_desc, buf_state);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (num_to_scan == 0) {
|
||||
gstrace_exit(GS_TRC_ID_BufferSync);
|
||||
return; /* nothing to do */
|
||||
|
Reference in New Issue
Block a user