Open akamensky opened 4 years ago
It appears to iterate through the list of "default" dsns, which is so wrong in my opinion. There should be only one default DSN, if that does not work it should fail. Otherwise with it iterating over a list to find the one that works I end up on situation where one scrape takes 5 seconds, and my goal is to scrape every second.
Also it appears to open and close postgres connection for every scrape, that is pretty bad, it will be very slow.
FFFFFFFFF, it is just broken. I provided UNIX SOCKET DSN, with --auto-discover-databases
it tries to connect to every discovered DB over TCP, which fails.
@akamensky there already is a PR potentially fixing this ... https://github.com/wrouesnel/postgres_exporter/pull/366
100% of tools use default DSN VERY different from what postgres_exporter is trying to use.
It should be using local socket file, w/o password relying on ident authentication. By default it is trying to use some password, whereas postgres default way for authentication is passwordless ident.