diff --git a/collector/pg_postmaster.go b/collector/pg_postmaster.go index 4bef4296..b81e4f90 100644 --- a/collector/pg_postmaster.go +++ b/collector/pg_postmaster.go @@ -23,7 +23,7 @@ import ( const postmasterSubsystem = "postmaster" func init() { - registerCollector(postmasterSubsystem, defaultEnabled, NewPGPostmasterCollector) + registerCollector(postmasterSubsystem, defaultDisabled, NewPGPostmasterCollector) } type PGPostmasterCollector struct { @@ -44,7 +44,7 @@ var ( []string{}, nil, ) - pgPostmasterQuery = "SELECT pg_postmaster_start_time from pg_postmaster_start_time();" + pgPostmasterQuery = "SELECT extract(epoch from pg_postmaster_start_time) from pg_postmaster_start_time();" ) func (c *PGPostmasterCollector) Update(ctx context.Context, instance *instance, ch chan<- prometheus.Metric) error { diff --git a/collector/pg_process_idle.go b/collector/pg_process_idle.go index 4f4aa4cd..57df723a 100644 --- a/collector/pg_process_idle.go +++ b/collector/pg_process_idle.go @@ -84,7 +84,7 @@ func (PGProcessIdleCollector) Update(ctx context.Context, instance *instance, ch var applicationName sql.NullString var secondsSum sql.NullInt64 var secondsCount sql.NullInt64 - var seconds []int64 + var seconds []uint64 var secondsBucket []uint64 err := row.Scan(&applicationName, &secondsSum, &secondsCount, &seconds, &secondsBucket)