erlang plugin: Have "send_error" free the *entire* term.
[collectd.git] / src / postgresql_default.conf
index 21a0cd5..83a32c7 100644 (file)
@@ -1,4 +1,9 @@
 # Pre-defined queries of collectd's postgresql plugin.
+#
+# Do not edit this file. If you want to change any of the query definitions,
+# overwrite them in collectd.conf instead.
+#
+# This file is distributed under the same terms as collectd itself.
 
 <Query backends>
        Statement "SELECT count(*) AS count \
 </Query>
 
 <Query disk_io>
-       Statement "SELECT sum(heap_blks_read) AS heap_read, \
-                       sum(heap_blks_hit) AS heap_hit, \
-                       sum(idx_blks_read) AS idx_read, \
-                       sum(idx_blks_hit) AS idx_hit, \
-                       sum(toast_blks_read) AS toast_read, \
-                       sum(toast_blks_hit) AS toast_hit, \
-                       sum(tidx_blks_read) AS tidx_read, \
-                       sum(tidx_blks_hit) AS tidx_hit \
+       Statement "SELECT coalesce(sum(heap_blks_read), 0) AS heap_read, \
+                       coalesce(sum(heap_blks_hit), 0) AS heap_hit, \
+                       coalesce(sum(idx_blks_read), 0) AS idx_read, \
+                       coalesce(sum(idx_blks_hit), 0) AS idx_hit, \
+                       coalesce(sum(toast_blks_read), 0) AS toast_read, \
+                       coalesce(sum(toast_blks_hit), 0) AS toast_hit, \
+                       coalesce(sum(tidx_blks_read), 0) AS tidx_read, \
+                       coalesce(sum(tidx_blks_hit), 0) AS tidx_hit \
                FROM pg_statio_user_tables;"
 
        <Result>