aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/buffer/bufmgr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/storage/buffer/bufmgr.c')
-rw-r--r--src/backend/storage/buffer/bufmgr.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index 7141eb83c68..3d28946699a 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -1691,6 +1691,10 @@ BufferSync(int flags)
UnlockBufHdr(bufHdr);
}
+ elog(IsPostmasterEnvironment ? LOG : NOTICE,
+ "BufferSync(%x) beginning to write %d buffers at %s",
+ flags, num_to_write, current_time_as_str());
+
if (num_to_write == 0)
return; /* nothing to do */
@@ -1745,6 +1749,11 @@ BufferSync(int flags)
if (num_written >= num_to_write)
break;
+ if ((num_written % 1024) == 0)
+ elog(IsPostmasterEnvironment ? LOG : NOTICE,
+ "BufferSync(%x) wrote %d/%d buffers at %s",
+ flags, num_written, num_to_write, current_time_as_str());
+
/*
* Sleep to throttle our I/O rate.
*/
@@ -1756,6 +1765,10 @@ BufferSync(int flags)
buf_id = 0;
}
+ elog(IsPostmasterEnvironment ? LOG : NOTICE,
+ "BufferSync(%x) done, wrote %d/%d buffers at %s",
+ flags, num_written, num_to_write, current_time_as_str());
+
/*
* Update checkpoint statistics. As noted above, this doesn't include
* buffers written by other backends or bgwriter scan.