Additional thoughts on WALSender cpu reduction. Use long type

and alter a comment to reduce confusion.
This commit is contained in:
Simon Riggs 2010-03-24 21:41:57 +00:00
parent e6867eebd4
commit 92fc0db99f

View 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;