mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-27 08:39:28 +08:00
Additional thoughts on WALSender cpu reduction. Use long type
and alter a comment to reduce confusion.
This commit is contained in:
parent
e6867eebd4
commit
92fc0db99f
@ -30,7 +30,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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 */
|
/* Loop forever */
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
int remain; /* remaining time (ms) */
|
long remain; /* remaining time (us) */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Emergency bailout if postmaster has died. This is to avoid the
|
* 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
|
* On some platforms, signals won't interrupt the sleep. To ensure we
|
||||||
* respond reasonably promptly when someone signals us, break down the
|
* 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.
|
* interrupts after each nap.
|
||||||
*/
|
*/
|
||||||
remain = WalSndDelay * 1000L;
|
remain = WalSndDelay * 1000L;
|
||||||
|
Loading…
Reference in New Issue
Block a user