From a032fff071f672a989528542e705e72491298e6f Mon Sep 17 00:00:00 2001 From: Lamaric Date: Thu, 1 Aug 2024 16:20:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E6=BA=90=E6=B1=A0=E5=8C=96=E5=AD=98?= =?UTF-8?q?=E5=82=A8=E5=A4=8D=E5=88=B6=E5=A4=87=E9=9B=86=E7=BE=A4=E6=B2=A1?= =?UTF-8?q?=E6=9C=89remove=20xlogfile=E7=9A=84=E9=9C=80=E8=A6=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gausskernel/storage/access/transam/xlog.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gausskernel/storage/access/transam/xlog.cpp b/src/gausskernel/storage/access/transam/xlog.cpp index 31b2b8ab9..47e087b02 100755 --- a/src/gausskernel/storage/access/transam/xlog.cpp +++ b/src/gausskernel/storage/access/transam/xlog.cpp @@ -6861,6 +6861,10 @@ static XLogSegNo GetOldestXLOGSegNo(const char *workingPath) (void)closedir(xlogDir); if (sscanf_s(oldestXLogFileName, "%08X%08X%08X", &tli, &xlogReadLogid, &xlogReadLogSeg) != 3) { + if (SS_DORADO_STANDBY_CLUSTER) { + /* ss standby cluster does not actually need to remove xlog file. */ + return (XLogSegNo)0; + } ereport(ERROR, (errcode_for_file_access(), errmsg("failed to translate name to xlog in GetOldestXLOGSegNo."))); } segno = (uint64)xlogReadLogid * XLogSegmentsPerXLogId + xlogReadLogSeg - 1;