]> granicus.if.org Git - postgresql/commitdiff
Additional thoughts on WALSender cpu reduction. Use long type
authorSimon Riggs <simon@2ndQuadrant.com>
Wed, 24 Mar 2010 21:41:57 +0000 (21:41 +0000)
committerSimon Riggs <simon@2ndQuadrant.com>
Wed, 24 Mar 2010 21:41:57 +0000 (21:41 +0000)
and alter a comment to reduce confusion.

src/backend/replication/walsender.c

index fa0b363054c7148ea0926c95e3db0bc43d14e521..f1a995dccc4d817488d2a0a48fa33d10c0205efd 100644 (file)
@@ -30,7 +30,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/replication/walsender.c,v 1.11 2010/03/24 20:11:12 sriggs Exp $
+ *       $PostgreSQL: pgsql/src/backend/replication/walsender.c,v 1.12 2010/03/24 21:41:57 sriggs Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -353,7 +353,7 @@ WalSndLoop(void)
        /* Loop forever */
        for (;;)
        {
-               int                     remain;         /* remaining time (ms) */
+               long    remain;         /* remaining time (us) */
 
                /*
                 * Emergency bailout if postmaster has died.  This is to avoid the
@@ -393,7 +393,7 @@ WalSndLoop(void)
                 *
                 * On some platforms, signals won't interrupt the sleep.  To ensure we
                 * respond reasonably promptly when someone signals us, break down the
-                * sleep into NAPTIME_PER_CYCLE (ms) increments, and check for
+                * sleep into NAPTIME_PER_CYCLE increments, and check for
                 * interrupts after each nap.
                 */
                remain = WalSndDelay * 1000L;