@ -693,9 +693,9 @@ allow_immediate_pgstat_restart(void)
/*
/*
* Shut down a single backend ' s statistics reporting at process exit .
* Shut down a single backend ' s statistics reporting at process exit .
*
*
* Flush any remaining statistics counts out to the collector .
* Flush out any remaining statistics counts . Without this , operations
* Without this , operations triggered during backend exit ( such as
* triggered during backend exit ( such as temp table deletions ) won ' t be
* temp table deletions ) won ' t be counted .
* counted .
*/
*/
static void
static void
pgstat_shutdown_hook ( int code , Datum arg )
pgstat_shutdown_hook ( int code , Datum arg )
@ -703,10 +703,10 @@ pgstat_shutdown_hook(int code, Datum arg)
Assert ( ! pgstat_is_shutdown ) ;
Assert ( ! pgstat_is_shutdown ) ;
/*
/*
* If we got as far as discovering our own database ID , we can report wha t
* If we got as far as discovering our own database ID , we can flush ou t
* we did to the collecto r. Otherwise , we ' d be send ing an invalid
* what w e did so fa r. Otherwise , we ' d be report ing an invalid database
* database ID , so forget it . ( This means that accesses to pg_database
* ID , so forget it . ( This means that accesses to pg_database during
* during failed backend starts might never get counted . )
* failed backend starts might never get counted . )
*/
*/
if ( OidIsValid ( MyDatabaseId ) )
if ( OidIsValid ( MyDatabaseId ) )
pgstat_report_stat ( true ) ;
pgstat_report_stat ( true ) ;
@ -1065,7 +1065,7 @@ pgstat_collect_oids(Oid catalogid, AttrNumber anum_oid)
}
}
/*
/*
* Tell the statistics collector to r eset counters for our database .
* R eset counters for our database .
*
*
* Permission checking for this function is managed through the normal
* Permission checking for this function is managed through the normal
* GRANT system .
* GRANT system .
@ -1084,7 +1084,7 @@ pgstat_reset_counters(void)
}
}
/*
/*
* Tell the statistics collector to r eset a single counter .
* R eset a single counter .
*
*
* Permission checking for this function is managed through the normal
* Permission checking for this function is managed through the normal
* GRANT system .
* GRANT system .
@ -1106,7 +1106,7 @@ pgstat_reset_single_counter(Oid objoid, PgStat_Single_Reset_Type type)
}
}
/*
/*
* Tell the statistics collector to r eset cluster - wide shared counters .
* R eset cluster - wide shared counters .
*
*
* Permission checking for this function is managed through the normal
* Permission checking for this function is managed through the normal
* GRANT system .
* GRANT system .
@ -1198,8 +1198,8 @@ pgstat_clear_snapshot(void)
/*
/*
* Support function for the SQL - callable pgstat * functions . Returns
* Support function for the SQL - callable pgstat * functions . Returns
* the collected statistics for one database or NULL . NULL doesn ' t mean
* the collected statistics for one database or NULL . NULL doesn ' t mean
* that the database doesn ' t exist , it is just not yet known by the
* that the database doesn ' t exist , just that there are no statistics , so the
* collector , so the c aller is better off to report ZERO instead .
* caller is better off to report ZERO instead .
*/
*/
PgStat_StatDBEntry *
PgStat_StatDBEntry *
pgstat_fetch_stat_dbentry ( Oid dbid )
pgstat_fetch_stat_dbentry ( Oid dbid )
@ -1233,8 +1233,8 @@ pgstat_fetch_global(void)
/*
/*
* Support function for the SQL - callable pgstat * functions . Returns
* Support function for the SQL - callable pgstat * functions . Returns
* the collected statistics for one table or NULL . NULL doesn ' t mean
* the collected statistics for one table or NULL . NULL doesn ' t mean
* that the table doesn ' t exist , it is just not yet known by the
* that the table doesn ' t exist , just that there are no statistics , so the
* collector , so the c aller is better off to report ZERO instead .
* caller is better off to report ZERO instead .
*/
*/
PgStat_StatTabEntry *
PgStat_StatTabEntry *
pgstat_fetch_stat_tabentry ( Oid relid )
pgstat_fetch_stat_tabentry ( Oid relid )