From 92fc0db99fb7a77864558615b76f4ab84227df30 Mon Sep 17 00:00:00 2001 From: Simon Riggs Date: Wed, 24 Mar 2010 21:41:57 +0000 Subject: [PATCH] Additional thoughts on WALSender cpu reduction. Use long type and alter a comment to reduce confusion. --- src/backend/replication/walsender.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c index fa0b363054..f1a995dccc 100644 --- a/src/backend/replication/walsender.c +++ b/src/backend/replication/walsender.c @@ -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; -- 2.40.0