projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
55826ee
)
pgsql plugin: avoid parsing error from query_plans
author
Bernd Zeimetz
<bernd@bzed.de>
Fri, 2 Sep 2016 11:23:40 +0000
(13:23 +0200)
committer
Marc Fournier
<marc.fournier@camptocamp.com>
Mon, 5 Sep 2016 06:59:11 +0000
(08:59 +0200)
idx_scan/idx_tup_fetch can be NULL, avoid trying to parse that into a number.
This should fix #1905.
src/postgresql_default.conf
patch
|
blob
|
history
diff --git
a/src/postgresql_default.conf
b/src/postgresql_default.conf
index
f905eb2
..
7ec971a
100644
(file)
--- a/
src/postgresql_default.conf
+++ b/
src/postgresql_default.conf
@@
-159,10
+159,10
@@
</Query>
<Query query_plans>
- Statement "SELECT
sum(seq_scan
) AS seq, \
-
sum(seq_tup_read
) AS seq_tup_read, \
-
sum(idx_scan
) AS idx, \
-
sum(idx_tup_fetch
) AS idx_tup_fetch \
+ Statement "SELECT
coalesce(sum(seq_scan), 0
) AS seq, \
+
coalesce(sum(seq_tup_read), 0
) AS seq_tup_read, \
+
coalesce(sum(idx_scan), 0
) AS idx, \
+
coalesce(sum(idx_tup_fetch), 0
) AS idx_tup_fetch \
FROM pg_stat_user_tables;"
<Result>