summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cb6b71d)
raw | patch | inline | side by side (parent: cb6b71d)
author | Marc Fournier <marc.fournier@camptocamp.com> | |
Wed, 8 Nov 2017 16:26:51 +0000 (17:26 +0100) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Wed, 8 Nov 2017 20:32:35 +0000 (21:32 +0100) |
These queries return empty values when a database doesn't have any
tables yet, which results in collectd logging this error every Interval:
```
db query utils: udb_result_submit: Parsing `' as derive failed.
```
Related to #1905
tables yet, which results in collectd logging this error every Interval:
```
db query utils: udb_result_submit: Parsing `' as derive failed.
```
Related to #1905
src/postgresql_default.conf | patch | blob | history |
index 0aac41e296cb5c87681e3ce41372afbaeea9617d..507990136200b1a02774eae614e1b6ab31fd0f50 100644 (file)
</Query>
<Query queries>
- Statement "SELECT sum(n_tup_ins) AS ins, \
- sum(n_tup_upd) AS upd, \
- sum(n_tup_del) AS del \
+ Statement "SELECT coalesce(sum(n_tup_ins), 0) AS ins, \
+ coalesce(sum(n_tup_upd), 0) AS upd, \
+ coalesce(sum(n_tup_del), 0) AS del \
FROM pg_stat_user_tables;"
<Result>
</Query>
<Query queries>
- Statement "SELECT sum(n_tup_ins) AS ins, \
- sum(n_tup_upd) AS upd, \
- sum(n_tup_del) AS del, \
- sum(n_tup_hot_upd) AS hot_upd \
+ Statement "SELECT coalesce(sum(n_tup_ins), 0) AS ins, \
+ coalesce(sum(n_tup_upd), 0) AS upd, \
+ coalesce(sum(n_tup_del), 0) AS del, \
+ coalesce(sum(n_tup_hot_upd), 0) AS hot_upd \
FROM pg_stat_user_tables;"
<Result>
</Query>
<Query table_states>
- Statement "SELECT sum(n_live_tup) AS live, sum(n_dead_tup) AS dead \
+ Statement "SELECT coalesce(sum(n_live_tup), 0) AS live, \
+ coalesce(sum(n_dead_tup), 0) AS dead \
FROM pg_stat_user_tables;"
<Result>