From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Stefan Badenhorst <Stefan.Badenhorst@mi-c3.com>
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: Missing documentation
Date: Thu, 3 Nov 2022 18:40:50 +0100
Message-ID: <20221103174050.3y3dgvqebk6oqq6c@alvherre.pgsql> (raw)
In-Reply-To: <2152961.1667496303@sss.pgh.pa.us>
On 2022-Nov-03, Tom Lane wrote:
> Stefan Badenhorst <Stefan.Badenhorst@mi-c3.com> writes:
> > I am using a prometheus exporter:
> > https://github.com/prometheus-community/postgres_exporter/
>
> Hmm, well, maybe prometheus is doing something with that part of the URL.
> There's no such behavior in Postgres itself, though.
Yeah, that part of the connection URI accepts libpq options, not
Postgres-server options. The only way that you can pass options to the
backend is to use "options=-c foo=bar" in the URI, but both the
whitespace and the second equals sign need to be URI-escaped, so you end
up with something like this:
?sslmode=disable&options=-c%20jit%3Doff
This is explained (to some extent) in "34.1.1.2 Connection URIs",
https://www.postgresql.org/docs/current/libpq-connect.html#id-1.7.3.8.3.6
and later "34.1.2 Parameter Key Words" explains that the parameter
"options" is used to pass command-line (!!) options to the server.
Maybe this bit of documentation is not explicit enough; some additional
examples might clarify things.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: alvherre@alvh.no-ip.org, tgl@sss.pgh.pa.us, Stefan.Badenhorst@mi-c3.com, pgsql-docs@lists.postgresql.org
Subject: Re: Missing documentation
In-Reply-To: <20221103174050.3y3dgvqebk6oqq6c@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox