Skip to content

Commit

Permalink
Merge pull request #777 from sysadmind/fix-replication-column-type
Browse files Browse the repository at this point in the history
Fix column type for pg_replication_slots
  • Loading branch information
SuperQ authored Mar 23, 2023
2 parents 3fe5d25 + 1e3b177 commit dde6e6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions collector/replication_slots.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (PGReplicationSlotCollector) Update(ctx context.Context, db *sql.DB, ch cha
var slot_name string
var wal_lsn int64
var flush_lsn int64
var is_active int64
var is_active bool
if err := rows.Scan(&slot_name, &wal_lsn, &flush_lsn, &is_active); err != nil {
return err
}
Expand All @@ -78,7 +78,7 @@ func (PGReplicationSlotCollector) Update(ctx context.Context, db *sql.DB, ch cha
pgReplicationSlot["current_wal_lsn"],
prometheus.GaugeValue, float64(wal_lsn), slot_name,
)
if is_active == 1 {
if is_active {
ch <- prometheus.MustNewConstMetric(
pgReplicationSlot["confirmed_flush_lsn"],
prometheus.GaugeValue, float64(flush_lsn), slot_name,
Expand Down

0 comments on commit dde6e6e

Please sign in to comment.