diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index c070278..e0b9aff 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -1221,11 +1221,12 @@ BufferSync(int flags) ResourceOwnerEnlargeBuffers(CurrentResourceOwner); /* - * Unless this is a shutdown checkpoint, we write only permanent, dirty - * buffers. But at shutdown or end of recovery, we write all dirty - * buffers. + * If a force checkpoint or at shutdown or end of recovery, we write all + * dirty buffers, otherwise we only write permanent buffers */ - if (!((flags & CHECKPOINT_IS_SHUTDOWN) || (flags & CHECKPOINT_END_OF_RECOVERY))) + if (!((flags & CHECKPOINT_IS_SHUTDOWN) || + (flags & CHECKPOINT_END_OF_RECOVERY) || + (flags & CHECKPOINT_FORCE))) mask |= BM_PERMANENT; /*