From 93b4a5e562262202af1c8b8f2b5856a7ee1cca91 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 177edbbf0..5d5ce3aaf 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 */