fix converting NULL to uint64 is unsupported in size table#1070
fix converting NULL to uint64 is unsupported in size table#1070Electronn wants to merge 4 commits intoprometheus-community:masterfrom
Conversation
926fe58 to
20e1017
Compare
| return err | ||
| } | ||
|
|
||
| var segmentsValue float64 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
size is NULL because the number of segments is 0, since the pg_ls_waldir() function in AWS Aurora returns 0 rows. It looks like WAL is implemented differently in Aurora, so this metric does not really make sense there. Possibly a different metric is needed for Aurora.
There was a problem hiding this comment.
But the count(*) will still be 0 even with no rows right?
This patch fixes bug of unwanted null in uint64 type. Bug causes errors on AWS Aurora PostgreSQL clusters: