@ -13,7 +13,7 @@
*
*
* Copyright ( c ) 2001 - 2008 , PostgreSQL Global Development Group
* Copyright ( c ) 2001 - 2008 , PostgreSQL Global Development Group
*
*
* $ PostgreSQL : pgsql / src / backend / postmaster / pgstat . c , v 1.184 2008 / 11 / 04 11 : 04 : 06 petere Exp $
* $ PostgreSQL : pgsql / src / backend / postmaster / pgstat . c , v 1.185 2008 / 12 / 08 15 : 44 : 54 tgl Exp $
* - - - - - - - - - -
* - - - - - - - - - -
*/
*/
# include "postgres.h"
# include "postgres.h"
@ -967,8 +967,12 @@ pgstat_vacuum_stat(void)
hash_destroy ( htab ) ;
hash_destroy ( htab ) ;
/*
/*
* Now repeat the above steps for functions .
* Now repeat the above steps for functions . However , we needn ' t bother
* in the common case where no function stats are being collected .
*/
*/
if ( dbentry - > functions ! = NULL & &
hash_get_num_entries ( dbentry - > functions ) > 0 )
{
htab = pgstat_collect_oids ( ProcedureRelationId ) ;
htab = pgstat_collect_oids ( ProcedureRelationId ) ;
pgstat_setheader ( & f_msg . m_hdr , PGSTAT_MTYPE_FUNCPURGE ) ;
pgstat_setheader ( & f_msg . m_hdr , PGSTAT_MTYPE_FUNCPURGE ) ;
@ -1016,6 +1020,7 @@ pgstat_vacuum_stat(void)
}
}
hash_destroy ( htab ) ;
hash_destroy ( htab ) ;
}
}
}