pgmetrics icon indicating copy to clipboard operation
pgmetrics copied to clipboard

Simple protocol queries must be run with standard_conforming_strings=on

Open alepaes1975 opened this issue 11 months ago • 3 comments

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

alepaes1975 avatar Feb 03 '25 22:02 alepaes1975

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.

mdevan avatar Feb 04 '25 07:02 mdevan

Hi,

Thanks. I will wait for the next release.

Best regards

alepaes1975 avatar Feb 04 '25 10:02 alepaes1975

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.

mdevan avatar Feb 21 '25 09:02 mdevan