From d8dae1b1abd1d670a08589b079a788e96ea985df Mon Sep 17 00:00:00 2001 From: Daniel Nelson Date: Tue, 20 Feb 2018 11:58:43 -0800 Subject: [PATCH] Fix memory leak in postgresql_extensible --- CHANGELOG.md | 1 + plugins/inputs/postgresql_extensible/postgresql_extensible.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d89a19bd..a235e19ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - [#3729](https://github.com/influxdata/telegraf/issues/3729): Set path to / if HOST_MOUNT_PREFIX matches full path. - [#3739](https://github.com/influxdata/telegraf/issues/3739): Remove userinfo from url tag in prometheus input. - [#3778](https://github.com/influxdata/telegraf/issues/3778): Fix ping plugin not reporting zero durations. +- [#3807](https://github.com/influxdata/telegraf/issues/3807): Fix memory leak in postgresql_extensible. ## v1.5.2 [2018-01-30] diff --git a/plugins/inputs/postgresql_extensible/postgresql_extensible.go b/plugins/inputs/postgresql_extensible/postgresql_extensible.go index 07a782f89..1fa29c010 100644 --- a/plugins/inputs/postgresql_extensible/postgresql_extensible.go +++ b/plugins/inputs/postgresql_extensible/postgresql_extensible.go @@ -127,6 +127,8 @@ func (p *Postgresql) Gather(acc telegraf.Accumulator) error { meas_name string ) + p.AllColumns = nil + if p.Address == "" || p.Address == "localhost" { p.Address = localhost }