wal_sender_delay and WaitLatchOrSocket
Started by Fujii Masaoover 15 years ago2 messages
Hi,
In 9.1dev, wal_sender_delay in *milliseconds* is given
to WaitLatchOrSocket as *microseconds* timeout. This is
obviously wrong. The attached patch fixes this problem.
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
Attachments:
wal_sender_delay_v1.patchapplication/octet-stream; name=wal_sender_delay_v1.patchDownload
*** a/src/backend/replication/walsender.c
--- b/src/backend/replication/walsender.c
***************
*** 452,458 **** WalSndLoop(void)
/* Sleep */
WaitLatchOrSocket(&MyWalSnd->latch, MyProcPort->sock,
! WalSndDelay);
}
/* Check if the connection was closed */
--- 452,458 ----
/* Sleep */
WaitLatchOrSocket(&MyWalSnd->latch, MyProcPort->sock,
! WalSndDelay * 1000L);
}
/* Check if the connection was closed */
Re: wal_sender_delay and WaitLatchOrSocket
On 14/09/10 16:02, Fujii Masao wrote:
Hi,
In 9.1dev, wal_sender_delay in *milliseconds* is given
to WaitLatchOrSocket as *microseconds* timeout. This is
obviously wrong. The attached patch fixes this problem.
Thanks, fixed.
I was just wondering earlier this morning why walsender process was
consuming so much CPU while there was nothing happening. Should've rang
the bells..
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com