Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Provide interim statistics while in mid-checkpoint.
authorSimon Riggs <simon@2ndQuadrant.com>
Fri, 1 Jun 2012 07:19:06 +0000 (08:19 +0100)
committerSimon Riggs <simon@2ndQuadrant.com>
Fri, 1 Jun 2012 07:19:06 +0000 (08:19 +0100)
Re-implements similar functionality in 9.1 and previously which
was removed during split of checkpointer and bgwriter.

Requested/spotted by Magnus Hagander

src/backend/postmaster/checkpointer.c

index 5db60cd5d982677b3b3b086f1a996917ecf63251..aa3df37324789c5fe8bac0c62b2d0233e855e9c5 100644 (file)
@@ -708,6 +708,11 @@ CheckpointWriteDelay(int flags, double progress)
 
        CheckArchiveTimeout();
 
+       /*
+        * Report interim activity statistics to the stats collector.
+        */
+       pgstat_send_bgwriter();
+
        /*
         * This sleep used to be connected to bgwriter_delay, typically 200ms.
         * That resulted in more frequent wakeups if not much work to do.