Skip to content

Commit

Permalink
Update collector/pg_postmaster.go
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: Felix Yuan <felix.yuan@reddit.com>
  • Loading branch information
Sticksman and SuperQ authored Jun 25, 2023
1 parent d692c95 commit 43e0475
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions collector/pg_postmaster.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,9 @@ func (c *PGPostmasterCollector) Update(ctx context.Context, instance *instance,
if err != nil {
return err
}
var startTimeSecondsMetric float64
startTimeSecondsMetric := 0.0
if startTimeSeconds.Valid {
startTimeSecondsMetric = startTimeSeconds.Float64
} else {
startTimeSecondsMetric = 0
}
ch <- prometheus.MustNewConstMetric(
pgPostMasterStartTimeSeconds,
Expand Down

0 comments on commit 43e0475

Please sign in to comment.