Hi,

While reading the code about logical replication, I found that
WalSndPrepareWrite function says it use XLogSendPhysical to fill out the
sendtime, however, it actually done by WalSndWriteData.  It looks like a
typo, attaching a very small patch to correct it.

-- 
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.

>From a5b710e744fe25e10f5a9480d3976ed36fa241ea Mon Sep 17 00:00:00 2001
From: Japin Li <japi...@hotmail.com>
Date: Thu, 14 Jan 2021 12:23:56 +0800
Subject: [PATCH v1 1/1] Fix typo about WalSndPrepareWrite

WalSndPrepareWrite function comment uses XLogSendPhysical to fill the
sendtime, but it actually done by WalSndWriteData.
---
 src/backend/replication/walsender.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index fe0d368a35..87bd647338 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -1243,7 +1243,7 @@ WalSndPrepareWrite(LogicalDecodingContext *ctx, XLogRecPtr lsn, TransactionId xi
 	pq_sendint64(ctx->out, lsn);	/* walEnd */
 
 	/*
-	 * Fill out the sendtime later, just as it's done in XLogSendPhysical, but
+	 * Fill out the sendtime later, just as it's done in WalSndWriteData, but
 	 * reserve space here.
 	 */
 	pq_sendint64(ctx->out, 0);	/* sendtime */
-- 
2.30.0

Reply via email to