From ba1300e7bb43cff9a4ee951ffcef2bb5e3b63b70 Mon Sep 17 00:00:00 2001 From: LiHeng Date: Sat, 10 Jul 2021 02:41:42 +0000 Subject: [PATCH] report wdr snapshot table statistics --- src/gausskernel/cbb/instruments/wdr/snapshot.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gausskernel/cbb/instruments/wdr/snapshot.cpp b/src/gausskernel/cbb/instruments/wdr/snapshot.cpp index 177edbbf..5d5ce3aa 100644 --- a/src/gausskernel/cbb/instruments/wdr/snapshot.cpp +++ b/src/gausskernel/cbb/instruments/wdr/snapshot.cpp @@ -1444,6 +1444,9 @@ void SnapshotNameSpace::SubSnapshotMain(void) SnapshotNameSpace::take_snapshot(); PopActiveSnapshot(); finish_xact_command(); + if (OidIsValid(u_sess->proc_cxt.MyDatabaseId)) { + pgstat_report_stat(true); + } ereport(LOG, (errcode(ERRCODE_SUCCESSFUL_COMPLETION), errmsg("WDR snapshot end"))); /* a snapshot has token on next_timestamp, we need get next_timestamp */