Simple protocol queries must be run with standard_conforming_strings=on
Hi,
I have this error when I run pgmetrics in a server with standard_conforming_strings=off. But I can't enable this in this servers. There is a workaround ?
Thanks
Not without recompiling. If you have a working Go installation, you can clone the repo, comment out the following line in collect.go:
connstr += makeKV("default_query_exec_mode", "simple_protocol")
and build pgmetrics using go build ./cmd/pgmetrics.
Simple protocol is required for PgBouncer and other proxying middleware.
However, it does make sense to offer an option to set the query mode to simple or extended, with simple as the default. We'll considering adding in this option in the next release.
Thanks for reporting.
Hi,
Thanks. I will wait for the next release.
Best regards
We just published a new release candidate v1.17.1-rc.2. This includes a command-line option --query-proto, which can be used to switch to extended protocol, like this:
pgmetrics --query-proto=extended ..other.args..
Do try it and let us know if it fixes the problem.