Skip to content

Conversation

tschuyebuhl
Copy link

@tschuyebuhl tschuyebuhl commented Jul 7, 2023

postgres=# SELECT CAST(extract(epoch from pg_postmaster_start_time()) AS INTEGER) as start_time;
 start_time 
------------
 1667939963
(1 row)

postgres=# SELECT extract(epoch from pg_postmaster_start_time()) as start_time;
    start_time     
-------------------
 1667939963.007028
(1 row)

the current query results in this error spam:

ts=2023-07-07T15:35:20.847Z caller=collector.go:190 level=error msg="collector failed" name=postmaster duration_seconds=0.016613707 err="sql: Scan error on column index 0, name \"pg_postmaster_start_time\": converting driver.Value type time.Time (\"2022-11-08 21:39:23.007028 +0100 CET\") to a float64: invalid syntax"
we probably dont need to use float64 with this change, but i didn't want to make a bigger mess for now
issue ref: #850

@sysadmind
Copy link
Contributor

I just checked locally, this has already been resolved in the master branch. v0.13.1 still has this bug. The error you see was resolved in #828

Also of note, we have opened #830 to track improvements to this collector.

@tschuyebuhl
Copy link
Author

Right. We can close this one. I just double checked now and, of course, you are right:
image
Thank you for your time anyways. Waiting til #828 makes its way downstream.

@SuperQ SuperQ closed this Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants