Skip to content

Commit

Permalink
[enh] set db_version at 0 if query version fails (influxdata#2819)
Browse files Browse the repository at this point in the history
  • Loading branch information
mced authored and jeichorn committed Jul 24, 2017
1 parent 3fc42e8 commit 40641a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

### Bugfixes

- [#2819](https://github.com/influxdata/telegraf/pull/2819): [enh] set db_version at 0 if query version fails
- [#2749](https://github.com/influxdata/telegraf/pull/2749): Fixed sqlserver input to work with case sensitive server collation.
- [#2716](https://github.com/influxdata/telegraf/pull/2716): Systemd does not see all shutdowns as failures
- [#2782](https://github.com/influxdata/telegraf/pull/2782): Reuse transports in input plugins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (p *Postgresql) Gather(acc telegraf.Accumulator) error {
query = `select substring(setting from 1 for 3) as version from pg_settings where name='server_version_num'`
err = db.QueryRow(query).Scan(&db_version)
if err != nil {
return err
db_version = 0
}
// We loop in order to process each query
// Query is not run if Database version does not match the query version.
Expand Down

0 comments on commit 40641a9

Please sign in to comment.