From: Bernd Zeimetz Date: Fri, 2 Sep 2016 11:23:40 +0000 (+0200) Subject: pgsql plugin: avoid parsing error from query_plans X-Git-Tag: collectd-5.6.1~1^2~3^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e73ae9a16ebf982dc5712a8e4f4d4f864187e08a;p=collectd.git pgsql plugin: avoid parsing error from query_plans idx_scan/idx_tup_fetch can be NULL, avoid trying to parse that into a number. This should fix #1905. --- diff --git a/src/postgresql_default.conf b/src/postgresql_default.conf index f905eb2a..7ec971a2 100644 --- a/src/postgresql_default.conf +++ b/src/postgresql_default.conf @@ -159,10 +159,10 @@ - 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;"