-extern bool pgstat_collect_startcollector;
-extern bool pgstat_collect_resetonpmstart;
-extern bool pgstat_collect_querystring;
-extern bool pgstat_collect_tuplelevel;
-extern bool pgstat_collect_blocklevel;
+typedef struct PgStat_StatTabEntry
+{
+ Oid tableid;
+
+ PgStat_Counter numscans;
+
+ PgStat_Counter tuples_returned;
+ PgStat_Counter tuples_fetched;
+
+ PgStat_Counter tuples_inserted;
+ PgStat_Counter tuples_updated;
+ PgStat_Counter tuples_deleted;
+
+ PgStat_Counter n_live_tuples;
+ PgStat_Counter n_dead_tuples;
+ PgStat_Counter last_anl_tuples;
+
+ PgStat_Counter blocks_fetched;
+ PgStat_Counter blocks_hit;
+
+ TimestampTz vacuum_timestamp; /* user initiated vacuum */
+ TimestampTz autovac_vacuum_timestamp; /* autovacuum initiated */
+ TimestampTz analyze_timestamp; /* user initiated */
+ TimestampTz autovac_analyze_timestamp; /* autovacuum initiated */
+} PgStat_StatTabEntry;
+
+
+/*
+ * Global statistics kept in the stats collector
+ */
+typedef struct PgStat_GlobalStats
+{
+ PgStat_Counter timed_checkpoints;
+ PgStat_Counter requested_checkpoints;
+ PgStat_Counter buf_written_checkpoints;
+ PgStat_Counter buf_written_lru;
+ PgStat_Counter buf_written_all;
+ PgStat_Counter maxwritten_lru;
+ PgStat_Counter maxwritten_all;
+} PgStat_GlobalStats;
+