For confirmed bugs, please report:
# Run under Windows
$ metricbeat modules enable postgresql
$ vim modules.d/postgresql.yml
> set period to 3s
This causes an inordinate amount of open connections to PostgreSQL server, all of them in the ESTABLISHED state. Windows becomes unusable / SQL server crashes due to OOM.
Under macOS, the metricbeat process peaks around 1200 open sockets, most of them in the CLOSE_WAIT state. Under Windows, those are shown as ESTABLISHED and don't seem to clean up after Metricbeat is killed (Sysinternals tcpview becomes sluggish).

This bug may be related:
golang/go#6593
Tried SetMaxOpenConns / sharing a single DB object between filesets, but made no difference.
For confirmed bugs, please report:
This causes an inordinate amount of open connections to PostgreSQL server, all of them in the ESTABLISHED state. Windows becomes unusable / SQL server crashes due to OOM.
Under macOS, the metricbeat process peaks around 1200 open sockets, most of them in the CLOSE_WAIT state. Under Windows, those are shown as ESTABLISHED and don't seem to clean up after Metricbeat is killed (Sysinternals tcpview becomes sluggish).
This bug may be related:
golang/go#6593
Tried
SetMaxOpenConns/ sharing a single DB object between filesets, but made no difference.