1313 *
1414 *Copyright (c) 2001-2005, PostgreSQL Global Development Group
1515 *
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 $
1717 * ----------
1818 */
1919#include "postgres.h"
@@ -2776,13 +2776,13 @@ pgstat_recv_vacuum(PgStat_MsgVacuum *msg, int len)
27762776 */
27772777if (!found )
27782778{
2779- tabentry -> tableid = msg -> m_tableoid ;
2779+ tabentry -> numscans = 0 ;
27802780
27812781tabentry -> tuples_returned = 0 ;
27822782tabentry -> tuples_fetched = 0 ;
2783- tabentry -> tuples_inserted = msg -> m_tuples ;
2784- tabentry -> tuples_deleted = 0 ;
2783+ tabentry -> tuples_inserted = 0 ;
27852784tabentry -> tuples_updated = 0 ;
2785+ tabentry -> tuples_deleted = 0 ;
27862786
27872787tabentry -> n_live_tuples = msg -> m_tuples ;
27882788tabentry -> n_dead_tuples = 0 ;
@@ -2794,11 +2794,13 @@ pgstat_recv_vacuum(PgStat_MsgVacuum *msg, int len)
27942794
27952795tabentry -> blocks_fetched = 0 ;
27962796tabentry -> blocks_hit = 0 ;
2797+
2798+ tabentry -> destroy = 0 ;
27972799}
27982800else
27992801{
2800- tabentry -> n_dead_tuples = 0 ;
28012802tabentry -> n_live_tuples = msg -> m_tuples ;
2803+ tabentry -> n_dead_tuples = 0 ;
28022804if (msg -> m_analyze )
28032805tabentry -> last_anl_tuples = msg -> m_tuples ;
28042806}
@@ -2827,20 +2829,22 @@ pgstat_recv_analyze(PgStat_MsgAnalyze *msg, int len)
28272829 */
28282830if (!found )
28292831{
2830- tabentry -> tableid = msg -> m_tableoid ;
2832+ tabentry -> numscans = 0 ;
28312833
28322834tabentry -> tuples_returned = 0 ;
28332835tabentry -> tuples_fetched = 0 ;
28342836tabentry -> tuples_inserted = 0 ;
2835- tabentry -> tuples_deleted = 0 ;
28362837tabentry -> tuples_updated = 0 ;
2838+ tabentry -> tuples_deleted = 0 ;
28372839
28382840tabentry -> n_live_tuples = msg -> m_live_tuples ;
28392841tabentry -> n_dead_tuples = msg -> m_dead_tuples ;
28402842tabentry -> last_anl_tuples = msg -> m_live_tuples + msg -> m_dead_tuples ;
28412843
28422844tabentry -> blocks_fetched = 0 ;
28432845tabentry -> blocks_hit = 0 ;
2846+
2847+ tabentry -> destroy = 0 ;
28442848}
28452849else
28462850{
@@ -2931,12 +2935,14 @@ pgstat_recv_tabstat(PgStat_MsgTabstat *msg, int len)
29312935tabentry -> tuples_inserted = tabmsg [i ].t_tuples_inserted ;
29322936tabentry -> tuples_updated = tabmsg [i ].t_tuples_updated ;
29332937tabentry -> 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 ;
29362938
29372939tabentry -> n_live_tuples = tabmsg [i ].t_tuples_inserted ;
29382940tabentry -> n_dead_tuples = tabmsg [i ].t_tuples_updated +
29392941tabmsg [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 ;
29402946
29412947tabentry -> destroy = 0 ;
29422948}
@@ -2951,12 +2957,13 @@ pgstat_recv_tabstat(PgStat_MsgTabstat *msg, int len)
29512957tabentry -> tuples_inserted += tabmsg [i ].t_tuples_inserted ;
29522958tabentry -> tuples_updated += tabmsg [i ].t_tuples_updated ;
29532959tabentry -> 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 ;
29562960
29572961tabentry -> n_live_tuples += tabmsg [i ].t_tuples_inserted ;
29582962tabentry -> n_dead_tuples += tabmsg [i ].t_tuples_updated +
29592963tabmsg [i ].t_tuples_deleted ;
2964+
2965+ tabentry -> blocks_fetched += tabmsg [i ].t_blocks_fetched ;
2966+ tabentry -> blocks_hit += tabmsg [i ].t_blocks_hit ;
29602967}
29612968
29622969/*