13
13
*
14
14
* Copyright (c) 2001-2005, PostgreSQL Global Development Group
15
15
*
16
- * $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.100 2005/07/14 05:13:40 tgl Exp $
16
+ * $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.101 2005/07/24 00:33:28 tgl Exp $
17
17
* ----------
18
18
*/
19
19
#include "postgres.h"
@@ -2776,13 +2776,13 @@ pgstat_recv_vacuum(PgStat_MsgVacuum *msg, int len)
2776
2776
*/
2777
2777
if (!found )
2778
2778
{
2779
- tabentry -> tableid = msg -> m_tableoid ;
2779
+ tabentry -> numscans = 0 ;
2780
2780
2781
2781
tabentry -> tuples_returned = 0 ;
2782
2782
tabentry -> tuples_fetched = 0 ;
2783
- tabentry -> tuples_inserted = msg -> m_tuples ;
2784
- tabentry -> tuples_deleted = 0 ;
2783
+ tabentry -> tuples_inserted = 0 ;
2785
2784
tabentry -> tuples_updated = 0 ;
2785
+ tabentry -> tuples_deleted = 0 ;
2786
2786
2787
2787
tabentry -> n_live_tuples = msg -> m_tuples ;
2788
2788
tabentry -> n_dead_tuples = 0 ;
@@ -2794,11 +2794,13 @@ pgstat_recv_vacuum(PgStat_MsgVacuum *msg, int len)
2794
2794
2795
2795
tabentry -> blocks_fetched = 0 ;
2796
2796
tabentry -> blocks_hit = 0 ;
2797
+
2798
+ tabentry -> destroy = 0 ;
2797
2799
}
2798
2800
else
2799
2801
{
2800
- tabentry -> n_dead_tuples = 0 ;
2801
2802
tabentry -> n_live_tuples = msg -> m_tuples ;
2803
+ tabentry -> n_dead_tuples = 0 ;
2802
2804
if (msg -> m_analyze )
2803
2805
tabentry -> last_anl_tuples = msg -> m_tuples ;
2804
2806
}
@@ -2827,20 +2829,22 @@ pgstat_recv_analyze(PgStat_MsgAnalyze *msg, int len)
2827
2829
*/
2828
2830
if (!found )
2829
2831
{
2830
- tabentry -> tableid = msg -> m_tableoid ;
2832
+ tabentry -> numscans = 0 ;
2831
2833
2832
2834
tabentry -> tuples_returned = 0 ;
2833
2835
tabentry -> tuples_fetched = 0 ;
2834
2836
tabentry -> tuples_inserted = 0 ;
2835
- tabentry -> tuples_deleted = 0 ;
2836
2837
tabentry -> tuples_updated = 0 ;
2838
+ tabentry -> tuples_deleted = 0 ;
2837
2839
2838
2840
tabentry -> n_live_tuples = msg -> m_live_tuples ;
2839
2841
tabentry -> n_dead_tuples = msg -> m_dead_tuples ;
2840
2842
tabentry -> last_anl_tuples = msg -> m_live_tuples + msg -> m_dead_tuples ;
2841
2843
2842
2844
tabentry -> blocks_fetched = 0 ;
2843
2845
tabentry -> blocks_hit = 0 ;
2846
+
2847
+ tabentry -> destroy = 0 ;
2844
2848
}
2845
2849
else
2846
2850
{
@@ -2931,12 +2935,14 @@ pgstat_recv_tabstat(PgStat_MsgTabstat *msg, int len)
2931
2935
tabentry -> tuples_inserted = tabmsg [i ].t_tuples_inserted ;
2932
2936
tabentry -> tuples_updated = tabmsg [i ].t_tuples_updated ;
2933
2937
tabentry -> tuples_deleted = tabmsg [i ].t_tuples_deleted ;
2934
- tabentry -> blocks_fetched = tabmsg [i ].t_blocks_fetched ;
2935
- tabentry -> blocks_hit = tabmsg [i ].t_blocks_hit ;
2936
2938
2937
2939
tabentry -> n_live_tuples = tabmsg [i ].t_tuples_inserted ;
2938
2940
tabentry -> n_dead_tuples = tabmsg [i ].t_tuples_updated +
2939
2941
tabmsg [i ].t_tuples_deleted ;
2942
+ tabentry -> last_anl_tuples = 0 ;
2943
+
2944
+ tabentry -> blocks_fetched = tabmsg [i ].t_blocks_fetched ;
2945
+ tabentry -> blocks_hit = tabmsg [i ].t_blocks_hit ;
2940
2946
2941
2947
tabentry -> destroy = 0 ;
2942
2948
}
@@ -2951,12 +2957,13 @@ pgstat_recv_tabstat(PgStat_MsgTabstat *msg, int len)
2951
2957
tabentry -> tuples_inserted += tabmsg [i ].t_tuples_inserted ;
2952
2958
tabentry -> tuples_updated += tabmsg [i ].t_tuples_updated ;
2953
2959
tabentry -> tuples_deleted += tabmsg [i ].t_tuples_deleted ;
2954
- tabentry -> blocks_fetched += tabmsg [i ].t_blocks_fetched ;
2955
- tabentry -> blocks_hit += tabmsg [i ].t_blocks_hit ;
2956
2960
2957
2961
tabentry -> n_live_tuples += tabmsg [i ].t_tuples_inserted ;
2958
2962
tabentry -> n_dead_tuples += tabmsg [i ].t_tuples_updated +
2959
2963
tabmsg [i ].t_tuples_deleted ;
2964
+
2965
+ tabentry -> blocks_fetched += tabmsg [i ].t_blocks_fetched ;
2966
+ tabentry -> blocks_hit += tabmsg [i ].t_blocks_hit ;
2960
2967
}
2961
2968
2962
2969
/*
0 commit comments