summaryrefslogtreecommitdiff
path: root/src/backend/storage/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/storage/ipc')
-rw-r--r--src/backend/storage/ipc/standby.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/backend/storage/ipc/standby.c b/src/backend/storage/ipc/standby.c
index ffe5e1563f5..70b0da50fc1 100644
--- a/src/backend/storage/ipc/standby.c
+++ b/src/backend/storage/ipc/standby.c
@@ -1193,6 +1193,15 @@ standby_redo(XLogReaderState *record)
running.xids = xlrec->xids;
ProcArrayApplyRecoveryInfo(&running);
+
+ /*
+ * The startup process currently has no convenient way to schedule
+ * stats to be reported. XLOG_RUNNING_XACTS records issued at a
+ * regular cadence, making this a convenient location to report
+ * stats. While these records aren't generated with wal_level=minimal,
+ * stats also cannot be accessed during WAL replay.
+ */
+ pgstat_report_stat(true);
}
else if (info == XLOG_INVALIDATIONS)
{