From e73ae9a16ebf982dc5712a8e4f4d4f864187e08a Mon Sep 17 00:00:00 2001 From: Bernd Zeimetz Date: Fri, 2 Sep 2016 13:23:40 +0200 Subject: [PATCH] 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. --- src/postgresql_default.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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;" -- 2.11.0