Skip to content

--collector.long_running_transactions returns collector error when enabledΒ #1199

@kalEl2001

Description

@kalEl2001

What did you do?
I enabled --collector.long_running_transactions flag

What did you expect to see?
Collector collected the expected long running transaction stats

What did you see instead? Under which circumstances?
I get this error on the log

time=2025-09-29T09:34:13.791Z level=ERROR source=collector.go:207 msg="collector failed" name=long_running_transactions duration_seconds=0.031405708 err="sql: Scan error on column index 1, name \"oldest_timestamp_seconds\": converting NULL to float64 is unsupported"

Environment
The exporter is running inside a Kubernetes cluster and the PostgreSQL DB is a GCP CloudSQL instance.

  • System information:

      `Linux 6.6.97+ x86_64`
    
  • postgres_exporter version:

postgres_exporter, version 0.18.0 (branch: HEAD, revision: e62fe086f0dc5a0866d4af494d34e0e3de0b16d7)
  build user:       root@f5e839e095ef
  build date:       20250925-19:45:01
  go version:       go1.24.7
  platform:         linux/amd64
  tags:             unknown
  • postgres_exporter flags:
--collector.stat_statements
--collector.stat_statements.include_query
--collector.long_running_transactions
  • PostgreSQL version:

    16

  • Logs:

time=2025-09-29T09:34:13.791Z level=ERROR source=collector.go:207 msg="collector failed" name=long_running_transactions duration_seconds=0.031405708 err="sql: Scan error on column index 1, name \"oldest_timestamp_seconds\": converting NULL to float64 is unsupported"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions