Skip to content

Conversation

Electronn
Copy link

This patch fixes bug of unwanted null in uint64 type. Bug causes errors on AWS Aurora PostgreSQL clusters:

Scan error on column index 1, name \"size\": converting NULL to uint64 is unsupported

Signed-off-by: Nikolai Vaganov <[email protected]>
Signed-off-by: Nikolai Vaganov <[email protected]>
err := row.Scan(&segments, &size)
if err != nil {
return err
}

var segmentsValue float64
Copy link
Contributor

Choose a reason for hiding this comment

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

segments should never be NULL. It's a count(*) which I don't believe can return a NULL value. The error you reported was on the size column. If Aurora is returning NULL for that column, I think there should not be a metric emitted from the exporter. I don't know what value a metric for WAL size with a value of 0 is.

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