summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/catalog/pg_proc.h2
-rw-r--r--src/include/pgstat.h26
2 files changed, 25 insertions, 3 deletions
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 61c6b27d1d..4c21b32519 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -3032,6 +3032,8 @@ DATA(insert OID = 1933 ( pg_stat_get_tuples_deleted PGNSP PGUID 12 1 0 0 f f f
DESCR("statistics: number of tuples deleted");
DATA(insert OID = 1972 ( pg_stat_get_tuples_hot_updated PGNSP PGUID 12 1 0 0 f f f t f s 1 0 20 "26" _null_ _null_ _null_ _null_ pg_stat_get_tuples_hot_updated _null_ _null_ _null_ ));
DESCR("statistics: number of tuples hot updated");
+DATA(insert OID = 1981 ( pg_stat_get_numtruncate PGNSP PGUID 12 1 0 0 f f f t f s 1 0 20 "26" _null_ _null_ _null_ _null_ pg_stat_get_numtruncate _null_ _null_ _null_ ));
+DESCR("statistics: number of table truncation");
DATA(insert OID = 2878 ( pg_stat_get_live_tuples PGNSP PGUID 12 1 0 0 f f f t f s 1 0 20 "26" _null_ _null_ _null_ _null_ pg_stat_get_live_tuples _null_ _null_ _null_ ));
DESCR("statistics: number of live tuples");
DATA(insert OID = 2879 ( pg_stat_get_dead_tuples PGNSP PGUID 12 1 0 0 f f f t f s 1 0 20 "26" _null_ _null_ _null_ _null_ pg_stat_get_dead_tuples _null_ _null_ _null_ ));
diff --git a/src/include/pgstat.h b/src/include/pgstat.h
index 87541433c0..648c08671c 100644
--- a/src/include/pgstat.h
+++ b/src/include/pgstat.h
@@ -86,6 +86,7 @@ typedef struct PgStat_TableCounts
PgStat_Counter t_tuples_updated;
PgStat_Counter t_tuples_deleted;
PgStat_Counter t_tuples_hot_updated;
+ PgStat_Counter t_numtruncate;
PgStat_Counter t_delta_live_tuples;
PgStat_Counter t_delta_dead_tuples;
@@ -137,15 +138,29 @@ typedef struct PgStat_TableStatus
PgStat_TableCounts t_counts; /* event counts to be sent */
} PgStat_TableStatus;
+/*
+ * PgStat_XactTruncateStatus Per-table, TRUNCATE (sub)transaction status
+ * ----------
+ */
+typedef struct PgStat_XactTruncateStatus
+{
+
+ PgStat_Counter numtruncate; /* number of truncates */
+ PgStat_Counter tuples_deleted; /* store previously deleted tuples */
+ PgStat_Counter tuples_inserted; /* store previously inserted tuples */
+
+} PgStat_XactTruncateStatus;
+
/* ----------
* PgStat_TableXactStatus Per-table, per-subtransaction status
* ----------
*/
typedef struct PgStat_TableXactStatus
{
- PgStat_Counter tuples_inserted; /* tuples inserted in (sub)xact */
- PgStat_Counter tuples_updated; /* tuples updated in (sub)xact */
- PgStat_Counter tuples_deleted; /* tuples deleted in (sub)xact */
+ PgStat_Counter tuples_inserted; /* tuples inserted in (sub)xact */
+ PgStat_Counter tuples_deleted; /* tuples deleted in (sub)xact */
+ PgStat_Counter tuples_updated; /* tuples updated in (sub)xact */
+ PgStat_XactTruncateStatus trunc_state; /* per-table TRUNCATE status */
int nest_level; /* subtransaction nest level */
/* links to other structs for same relation: */
struct PgStat_TableXactStatus *upper; /* next higher subxact if any */
@@ -519,7 +534,12 @@ typedef struct PgStat_StatTabEntry
PgStat_Counter n_live_tuples;
PgStat_Counter n_dead_tuples;
+<<<<<<< HEAD
+ PgStat_Counter numtruncate;
+ PgStat_Counter last_anl_tuples;
+=======
PgStat_Counter changes_since_analyze;
+>>>>>>> 6f4569d9b9b95c7cb2a04bdfd9c99ca3e7bada82
PgStat_Counter blocks_fetched;
PgStat_Counter blocks_hit;