aboutsummaryrefslogtreecommitdiff
path: root/src/include/pgstat.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-08-08 16:27:06 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2010-08-08 16:27:06 +0000
commit46aa77c7bd256b3448cc420e02ff59d7cc0270c1 (patch)
treecdf372525292dbd9290d69f3e94a5de010b4a108 /src/include/pgstat.h
parent83f5491c63f33cce5b84532cd76602295580809e (diff)
downloadpostgresql-46aa77c7bd256b3448cc420e02ff59d7cc0270c1.tar.gz
postgresql-46aa77c7bd256b3448cc420e02ff59d7cc0270c1.zip
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
Diffstat (limited to 'src/include/pgstat.h')
-rw-r--r--src/include/pgstat.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/include/pgstat.h b/src/include/pgstat.h
index 34577fa55b8..fae6cb8155f 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 */