From 8a114dfb6ae88491419d21c4c07a29dd3a1d0f77 Mon Sep 17 00:00:00 2001 From: MuJinqiang <1165845907@qq.com> Date: Fri, 12 Mar 2021 08:34:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=A7=A3=E5=86=B3=E5=BB=B6?= =?UTF-8?q?=E8=BF=9F=E5=9B=9E=E6=94=BE=E9=87=8D=E5=90=AF=E9=9B=86=E7=BE=A4?= =?UTF-8?q?walreceiver=E8=BF=9B=E7=A8=8B=E5=8F=AF=E8=83=BD=E6=B2=A1?= =?UTF-8?q?=E6=8B=89=E8=B5=B7=E6=9D=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gausskernel/storage/access/transam/xlog.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gausskernel/storage/access/transam/xlog.cpp b/src/gausskernel/storage/access/transam/xlog.cpp index bd8a54781..91bd4e013 100644 --- a/src/gausskernel/storage/access/transam/xlog.cpp +++ b/src/gausskernel/storage/access/transam/xlog.cpp @@ -7610,6 +7610,13 @@ static bool RecoveryApplyDelay(const XLogReaderState *record) return false; } + /* the walreceiver process is started behind here, + * ensure that the walreceiver process has been started, + * otherwise, the stream replication will be disconnected */ + if (g_instance.pid_cxt.WalReceiverPID == 0) { + return false; + } + /* * Is it a COMMIT record? * We deliberately choose not to delay aborts since they have no effect on