aboutsummaryrefslogtreecommitdiff
path: root/src/include/pgstat.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/pgstat.h')
-rw-r--r--src/include/pgstat.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/include/pgstat.h b/src/include/pgstat.h
index acadef35a20..6545ddf8588 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.87 2010/01/19 14:11:31 mha Exp $
+ * $PostgreSQL: pgsql/src/include/pgstat.h,v 1.88 2010/01/28 14:25:41 mha Exp $
* ----------
*/
#ifndef PGSTAT_H
@@ -39,6 +39,7 @@ typedef enum StatMsgType
PGSTAT_MTYPE_DROPDB,
PGSTAT_MTYPE_RESETCOUNTER,
PGSTAT_MTYPE_RESETSHAREDCOUNTER,
+ PGSTAT_MTYPE_RESETSINGLECOUNTER,
PGSTAT_MTYPE_AUTOVAC_START,
PGSTAT_MTYPE_VACUUM,
PGSTAT_MTYPE_ANALYZE,
@@ -100,6 +101,12 @@ typedef enum PgStat_Shared_Reset_Target
RESET_BGWRITER
} PgStat_Shared_Reset_Target;
+/* Possible object types for resetting single counters */
+typedef enum PgStat_Single_Reset_Type
+{
+ RESET_TABLE,
+ RESET_FUNCTION
+} PgStat_Single_Reset_Type;
/* ------------------------------------------------------------
* Structures kept in backend local memory while accumulating counts
@@ -279,6 +286,19 @@ typedef struct PgStat_MsgResetsharedcounter
} PgStat_MsgResetsharedcounter;
/* ----------
+ * PgStat_MsgResetsinglecounter Sent by the backend to tell the collector
+ * to reset a single counter
+ * ----------
+ */
+typedef struct PgStat_MsgResetsinglecounter
+{
+ PgStat_MsgHdr m_hdr;
+ Oid m_databaseid;
+ PgStat_Single_Reset_Type m_resettype;
+ Oid m_objectid;
+} PgStat_MsgResetsinglecounter;
+
+/* ----------
* PgStat_MsgAutovacStart Sent by the autovacuum daemon to signal
* that a database is going to be processed
* ----------
@@ -432,6 +452,7 @@ typedef union PgStat_Msg
PgStat_MsgDropdb msg_dropdb;
PgStat_MsgResetcounter msg_resetcounter;
PgStat_MsgResetsharedcounter msg_resetsharedcounter;
+ PgStat_MsgResetsinglecounter msg_resetsinglecounter;
PgStat_MsgAutovacStart msg_autovacuum;
PgStat_MsgVacuum msg_vacuum;
PgStat_MsgAnalyze msg_analyze;
@@ -654,6 +675,7 @@ extern void pgstat_drop_database(Oid databaseid);
extern void pgstat_clear_snapshot(void);
extern void pgstat_reset_counters(void);
extern void pgstat_reset_shared_counters(const char *);
+extern void pgstat_reset_single_counter(Oid objectid, PgStat_Single_Reset_Type type);
extern void pgstat_report_autovac(Oid dboid);
extern void pgstat_report_vacuum(Oid tableoid, bool shared, bool adopt_counts,