From 46aa77c7bd256b3448cc420e02ff59d7cc0270c1 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 8 Aug 2010 16:27:06 +0000 Subject: Add stats functions and views to provide access to a transaction's own statistics counts. These numbers are being accumulated but haven't yet been transmitted to the collector (and won't be, until the transaction ends). For some purposes, though, it's handy to be able to look at them. Joel Jacobson, reviewed by Itagaki Takahiro --- src/include/pgstat.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/include/pgstat.h') diff --git a/src/include/pgstat.h b/src/include/pgstat.h index 34577fa55b..fae6cb8155 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -5,7 +5,7 @@ * * Copyright (c) 2001-2010, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/include/pgstat.h,v 1.89 2010/02/26 02:01:20 momjian Exp $ + * $PostgreSQL: pgsql/src/include/pgstat.h,v 1.90 2010/08/08 16:27:06 tgl Exp $ * ---------- */ #ifndef PGSTAT_H @@ -692,6 +692,9 @@ extern void pgstat_report_xact_timestamp(TimestampTz tstamp); extern void pgstat_report_waiting(bool waiting); extern const char *pgstat_get_backend_current_activity(int pid, bool checkUser); +extern PgStat_TableStatus *find_tabstat_entry(Oid rel_id); +extern PgStat_BackendFunctionEntry *find_funcstat_entry(Oid func_id); + extern void pgstat_initstats(Relation rel); /* nontransactional event counts are simple enough to inline */ -- cgit v1.2.3