aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/storage/buffer/bufmgr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index 48520443001..b8680cc8fd4 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -5899,7 +5899,12 @@ ScheduleBufferTagForWriteback(WritebackContext *wb_context, IOContext io_context
{
PendingWriteback *pending;
- if (io_direct_flags & IO_DIRECT_DATA)
+ /*
+ * As pg_flush_data() doesn't do anything with fsync disabled, there's no
+ * point in tracking in that case.
+ */
+ if (io_direct_flags & IO_DIRECT_DATA ||
+ !enableFsync)
return;
/*