Skip to content

Commit

Permalink
Bug Fix: Fix lingering type issues (#828)
Browse files Browse the repository at this point in the history
* Fix postmaster type issue
* Disable postmaster collector by default

---------

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>
  • Loading branch information
Sticksman committed Jun 27, 2023
1 parent 030a2a9 commit e6ce2ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions collector/pg_postmaster.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
const postmasterSubsystem = "postmaster"

func init() {
registerCollector(postmasterSubsystem, defaultEnabled, NewPGPostmasterCollector)
registerCollector(postmasterSubsystem, defaultDisabled, NewPGPostmasterCollector)
}

type PGPostmasterCollector struct {
Expand All @@ -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 {
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

0 comments on commit e6ce2ec

Please sign in to comment.