Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3f1787c

Browse files
Minor but necessary improvements to WAL keepalives
Fujii Masao
1 parent21b446d commit3f1787c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

‎src/backend/replication/walreceiver.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,8 @@ ProcessWalSndrMessage(XLogRecPtr walEnd, TimestampTz sendTime)
750750
walrcv->lastMsgReceiptTime=lastMsgReceiptTime;
751751
SpinLockRelease(&walrcv->mutex);
752752

753-
elog(DEBUG2,"sendtime %s receipttime %s replication apply delay %d transfer latency %d",
753+
if (log_min_mesages <=DEBUG2)
754+
elog(DEBUG2,"sendtime %s receipttime %s replication apply delay %d ms transfer latency %d ms",
754755
timestamptz_to_str(sendTime),
755756
timestamptz_to_str(lastMsgReceiptTime),
756757
GetReplicationApplyDelay(),

‎src/backend/replication/walsender.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,12 @@ WalSndLoop(void)
834834
if (pq_is_send_pending())
835835
wakeEvents |=WL_SOCKET_WRITEABLE;
836836
else
837+
{
837838
WalSndKeepalive(output_message);
839+
/* Try to flush pending output to the client */
840+
if (pq_flush_if_writable()!=0)
841+
break;
842+
}
838843

839844
/* Determine time until replication timeout */
840845
if (replication_timeout>0)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp