Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion collector/pg_postmaster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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();"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would be better to change our var to a sql.NullTime, but if we're pushing changes to this collector to another set of changes, this is fine for now. I opened #830 to track.

)

func (c *PGPostmasterCollector) Update(ctx context.Context, instance *instance, ch chan<- prometheus.Metric) error {
Expand Down
2 changes: 1 addition & 1 deletion collector/pg_process_idle.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down