0003-Add-more-logs.patch
application/octet-stream
Filename: 0003-Add-more-logs.patch
Type: application/octet-stream
Part: 2
Patch
Format: format-patch
Series: patch 0003
Subject: Add more logs
| File | + | − |
|---|---|---|
| src/backend/replication/pgoutput/pgoutput.c | 1 | 0 |
| src/backend/replication/walsender.c | 6 | 0 |
From 9379dabecb42a5503e49821a236db9bba8063edf Mon Sep 17 00:00:00 2001
From: wangw <wangw.fnst@fujitsu.com>
Date: Fri, 21 Jan 2022 08:59:05 +0800
Subject: [PATCH] Add more logs
---
src/backend/replication/pgoutput/pgoutput.c | 1 +
src/backend/replication/walsender.c | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/src/backend/replication/pgoutput/pgoutput.c b/src/backend/replication/pgoutput/pgoutput.c
index 30dc4192cf..70b0c72fa9 100644
--- a/src/backend/replication/pgoutput/pgoutput.c
+++ b/src/backend/replication/pgoutput/pgoutput.c
@@ -655,6 +655,7 @@ pgoutput_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
case REORDER_BUFFER_CHANGE_INSERT:
if (!relentry->pubactions.pubinsert)
{
+ elog(LOG, "before invoking update progress");
OutputPluginUpdateProgress(ctx);
return;
}
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index d6270ac8cd..e02dc0b90b 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -3618,10 +3618,16 @@ WalSndKeepaliveIfNecessary(void)
* we're doing something not partaking in timeouts.
*/
if (wal_sender_timeout <= 0 || last_reply_timestamp <= 0)
+ {
+ elog(LOG, "return because wal_sender_timeout or last_reply_timestamp");
return;
+ }
if (waiting_for_ping_response)
+ {
+ elog(LOG, "return because waiting_for_ping_response");
return;
+ }
/*
* If half of wal_sender_timeout has lapsed without receiving any reply
--
2.18.4