@ -183,7 +183,7 @@ static void pgstat_prep_snapshot(void);
static void pgstat_build_snapshot ( void ) ;
static void pgstat_build_snapshot ( void ) ;
static void pgstat_build_snapshot_fixed ( PgStat_Kind kind ) ;
static void pgstat_build_snapshot_fixed ( PgStat_Kind kind ) ;
static inline bool pgstat_is_kind_valid ( int i kind) ;
static inline bool pgstat_is_kind_valid ( PgStat_Kind kind ) ;
/* ----------
/* ----------
@ -1089,7 +1089,7 @@ pgstat_build_snapshot(void)
/*
/*
* Build snapshot of all fixed - numbered stats .
* Build snapshot of all fixed - numbered stats .
*/
*/
for ( int kind = PGSTAT_KIND_FIRST_VALID ; kind < = PGSTAT_KIND_LAST ; kind + + )
for ( PgStat_Kind kind = PGSTAT_KIND_FIRST_VALID ; kind < = PGSTAT_KIND_LAST ; kind + + )
{
{
const PgStat_KindInfo * kind_info = pgstat_get_kind_info ( kind ) ;
const PgStat_KindInfo * kind_info = pgstat_get_kind_info ( kind ) ;
@ -1286,7 +1286,7 @@ pgstat_flush_pending_entries(bool nowait)
PgStat_Kind
PgStat_Kind
pgstat_get_kind_from_str ( char * kind_str )
pgstat_get_kind_from_str ( char * kind_str )
{
{
for ( int kind = PGSTAT_KIND_FIRST_VALID ; kind < = PGSTAT_KIND_LAST ; kind + + )
for ( PgStat_Kind kind = PGSTAT_KIND_FIRST_VALID ; kind < = PGSTAT_KIND_LAST ; kind + + )
{
{
if ( pg_strcasecmp ( kind_str , pgstat_kind_infos [ kind ] . name ) = = 0 )
if ( pg_strcasecmp ( kind_str , pgstat_kind_infos [ kind ] . name ) = = 0 )
return kind ;
return kind ;
@ -1299,9 +1299,9 @@ pgstat_get_kind_from_str(char *kind_str)
}
}
static inline bool
static inline bool
pgstat_is_kind_valid ( int i kind)
pgstat_is_kind_valid ( PgStat_Kind kind )
{
{
return i kind > = PGSTAT_KIND_FIRST_VALID & & i kind < = PGSTAT_KIND_LAST ;
return kind > = PGSTAT_KIND_FIRST_VALID & & kind < = PGSTAT_KIND_LAST ;
}
}
const PgStat_KindInfo *
const PgStat_KindInfo *
@ -1393,7 +1393,7 @@ pgstat_write_statsfile(XLogRecPtr redo)
write_chunk_s ( fpout , & redo ) ;
write_chunk_s ( fpout , & redo ) ;
/* Write various stats structs for fixed number of objects */
/* Write various stats structs for fixed number of objects */
for ( int kind = PGSTAT_KIND_FIRST_VALID ; kind < = PGSTAT_KIND_LAST ; kind + + )
for ( PgStat_Kind kind = PGSTAT_KIND_FIRST_VALID ; kind < = PGSTAT_KIND_LAST ; kind + + )
{
{
char * ptr ;
char * ptr ;
const PgStat_KindInfo * info = pgstat_get_kind_info ( kind ) ;
const PgStat_KindInfo * info = pgstat_get_kind_info ( kind ) ;
@ -1777,7 +1777,7 @@ pgstat_reset_after_failure(void)
TimestampTz ts = GetCurrentTimestamp ( ) ;
TimestampTz ts = GetCurrentTimestamp ( ) ;
/* reset fixed-numbered stats */
/* reset fixed-numbered stats */
for ( int kind = PGSTAT_KIND_FIRST_VALID ; kind < = PGSTAT_KIND_LAST ; kind + + )
for ( PgStat_Kind kind = PGSTAT_KIND_FIRST_VALID ; kind < = PGSTAT_KIND_LAST ; kind + + )
{
{
const PgStat_KindInfo * kind_info = pgstat_get_kind_info ( kind ) ;
const PgStat_KindInfo * kind_info = pgstat_get_kind_info ( kind ) ;