From 09b7694fb03d58883e8e1647c64c5bb7c119afab Mon Sep 17 00:00:00 2001 From: z00793368 Date: Mon, 12 Dec 2022 10:32:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=81=8D=E5=8E=86=E9=A1=BA?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gausskernel/process/postmaster/pgstat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gausskernel/process/postmaster/pgstat.cpp b/src/gausskernel/process/postmaster/pgstat.cpp index 908d811dc..063c7282f 100644 --- a/src/gausskernel/process/postmaster/pgstat.cpp +++ b/src/gausskernel/process/postmaster/pgstat.cpp @@ -8458,7 +8458,7 @@ static void pgstat_recv_filestat(PgStat_MsgFile* msg, int len) if (i == NUM_FILES) { TimestampTz longestTime = DBL_MAX; int minLocation = 0; - for (int j = NUM_FILES - 1; j >= 0; j--) { + for (int j = 0; j < NUM_FILES; j++) { entry = (PgStat_FileEntry*)&pgStatFileArray[j]; if (entry->time < longestTime) { longestTime = entry->time;