From 06090c19731ea95e0658bb46930ada9f6077035b Mon Sep 17 00:00:00 2001 From: ZigSmith Date: Fri, 12 Mar 2021 17:12:10 +0800 Subject: [PATCH] =?UTF-8?q?xlog=E6=97=A5=E5=BF=97=E6=B8=85=E7=A9=BA?= =?UTF-8?q?=E7=9A=84=E9=80=BB=E8=BE=91=E4=BC=98=E5=8C=96?= 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 67c01576e..e0b03ba73 100644 --- a/src/gausskernel/storage/access/transam/xlog.cpp +++ b/src/gausskernel/storage/access/transam/xlog.cpp @@ -4847,6 +4847,10 @@ static void UpdateLastRemovedPtr(const char *filename) */ static void RemoveOldXlogFiles(XLogSegNo segno, XLogRecPtr endptr) { + if (segno == 0) { + return; + } + DIR *xldir = NULL; struct dirent *xlde = NULL; char lastoff[MAXFNAMELEN];