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

Commit41d5f8a

Browse files
committed
Be less aggressive in asking for feedback of logical walsender clients.
When doing logical decoding using START_LOGICAL_REPLICATION in awalsender process the walsender sometimes was sending out keepalivemessages too frequently. Asking for feedback every time.WalSndWaitForWal() sends out keepalive messages when it's waiting fornew WAL to be generated locally when it sees that the remote sidehasn't yet flushed WAL up to the local position. That generally isgood but causes problems if the remote side only writes but doesn'tflush changes yet. So check for both remote write and flush position.Additionally we've asked for feedback to the keepalive message whichisn't warranted when waiting for WAL in contrast to preventingtimeouts because of wal_sender_timeout.Complaint and patch by Steve Singer.
1 parent51222a1 commit41d5f8a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎src/backend/replication/walsender.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,9 +1203,11 @@ WalSndWaitForWal(XLogRecPtr loc)
12031203
* possibly are waiting for a later location. So we send pings
12041204
* containing the flush location every now and then.
12051205
*/
1206-
if (MyWalSnd->flush<sentPtr&& !waiting_for_ping_response)
1206+
if (MyWalSnd->flush<sentPtr&&
1207+
MyWalSnd->write<sentPtr&&
1208+
!waiting_for_ping_response)
12071209
{
1208-
WalSndKeepalive(true);
1210+
WalSndKeepalive(false);
12091211
waiting_for_ping_response= true;
12101212
}
12111213

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp