Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oqeD5-0005Vg-NH for pgsql-docs@arkaria.postgresql.org; Thu, 03 Nov 2022 17:40:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oqeD4-000847-CW for pgsql-docs@arkaria.postgresql.org; Thu, 03 Nov 2022 17:40:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oqeD4-00083s-50 for pgsql-docs@lists.postgresql.org; Thu, 03 Nov 2022 17:40:58 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oqeD1-0000Jh-NU for pgsql-docs@lists.postgresql.org; Thu, 03 Nov 2022 17:40:57 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 84CA73200909; Thu, 3 Nov 2022 13:40:54 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 03 Nov 2022 13:40:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1667497254; x=1667583654; bh=F QPLZRkrJNoGGHru8pB/14E279vBsqdQtEmVgz9ZqnA=; b=h0bvEvKFAXvQE07K7 /p/h94yKKy9BGICWk1trJ/W301ckTpml2740ubw0oAmIPVlo53k15xZbskFMY7Ec ImUIOsBLpze+5Z5e48Paa8BJ5jKmOL2YyUSoebwwtuXnWqOyyjrfHnhF4j9YrLWP /4HSvuAvk6MNeok3f4btajA5mBeDjuJPGwIF1ktvGwDK05/RuwCs9EtomYwW1waE IWwNqvp+QOn/pQkxuw6nvh3flx2ey0qtbRvuzqz0NLFCPp+SRn11g+Q6unwuZgDz 8v/cwBZkF8BPF3m2X4k9UAlyuYLV7r32ORW72rkCGWx09g8YWXEGpykzIUwiQ4ug UWjXQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrudelgdelkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpeelteduieevheeffeelleevffeugedtffdtgfehuddtvddt vdejheevjeejgeeggfenucffohhmrghinhepghhithhhuhgsrdgtohhmpdhpohhsthhgrh gvshhqlhdrohhrghdpvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhh drnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 3 Nov 2022 13:40:53 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 77E1A74; Thu, 3 Nov 2022 18:40:50 +0100 (CET) Date: Thu, 3 Nov 2022 18:40:50 +0100 From: Alvaro Herrera To: Tom Lane Cc: Stefan Badenhorst , pgsql-docs@lists.postgresql.org Subject: Re: Missing documentation Message-ID: <20221103174050.3y3dgvqebk6oqq6c@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2152961.1667496303@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-Nov-03, Tom Lane wrote: > Stefan Badenhorst 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/