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 1lEmk5-0006K2-Ey for pgsql-docs@arkaria.postgresql.org; Wed, 24 Feb 2021 05:29:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lEmk3-00063K-IY for pgsql-docs@arkaria.postgresql.org; Wed, 24 Feb 2021 05:29:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lEmk3-00063D-BB for pgsql-docs@lists.postgresql.org; Wed, 24 Feb 2021 05:29:43 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lEmk0-0003yQ-My for pgsql-docs@lists.postgresql.org; Wed, 24 Feb 2021 05:29:42 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 376795C0159; Wed, 24 Feb 2021 00:29:38 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 24 Feb 2021 00:29:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=gAjn7K/iYnjYjNJCVEX8sW7ZgQX t+egqX+7YWrMUOmw=; b=nH1VoYBy2cYjt4MhHSg08uHkAiymqmrBWSHSbXciUmi 0+XJdj+/jrzyaG0bx3eSTdFw8g0BaIsndgKiaFd4HdKcATsQBodfOWAiKxf79J6S 1UcO5MYcUGZE1xHpJlv5lCqT4h3MjswsQtgiRiItwoHjL3Ad1+KFRx+BUyWCFhU9 yfbmaRYGlIOHdVUyFqAlXlHdUTzSWCl0ahGr2O454ZvE3KPmDW1CY6qnC76NCCFh BOGHLw5IRRgoBnglPZjo5HLd3JzSowlN1liFhW1wgH+pLa5gc1CUPw6SxG+i2lN+ VbB5lCHXd61S67EmRTDIoUUooMquH3Ck5eG08AAGAKw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=gAjn7K /iYnjYjNJCVEX8sW7ZgQXt+egqX+7YWrMUOmw=; b=I0VANsUHCTPiTk6srQPMAO Nv781aK2oRn+xHAo7A2sRctkzWiFcva5RlAD4zcY64kKUYN3iSovpgSEkPY7AIwR aVOcQDauEzmcXUschoZkWcDqqPp8/gau10YV1joTTAkb6cCJ44tUIOBkEFI5a7X7 JGgwZGtEIoqT1zEIXlUXn+o7BoZRYlT92GsyCS7ugPwrDRUBxVu836SAnr7ISb4i tT7OaT89pDMearchPe9BNVC5xD5c1nG2kdBjVjUeX+orqyJWSrGUzdmFAk8PkgkX 1ZeThLpnYrMlL06bT4uGh0EBLOtaxRdA9nno1VXtUgFBRgoAYH3GKq+2nlILQYOw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrkeeigdektdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdefhedmnecujfgurhepfffhvf fukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhi vghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnh epffdufeeflefghfekudekkeevvddugfeiteekkeduleefvefhhffftdduffeiuedtnecu ffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghenucfkphepudduuddruddtvddrud ektddrudekheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 613171080066; Wed, 24 Feb 2021 00:29:36 -0500 (EST) Date: Wed, 24 Feb 2021 14:29:31 +0900 From: Michael Paquier To: christophe.courtois@dalibo.com, pgsql-docs@lists.postgresql.org Subject: Re: pgbench: supports PGDATABASE / warning about -d Message-ID: References: <161399398648.21711.15387267201764682579@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="IDp5nWF8U8pckfaz" Content-Disposition: inline In-Reply-To: <161399398648.21711.15387267201764682579@wrigleys.postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --IDp5nWF8U8pckfaz Content-Type: multipart/mixed; boundary="POn96qxKc589seyS" Content-Disposition: inline --POn96qxKc589seyS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 22, 2021 at 11:39:46AM +0000, PG Doc comments form wrote: > 1) pgbench has always supported the PGDATABASE env variable, but it is not > listed along PGHOST/PGPORT & PGUSER in=20 > https://www.postgresql.org/docs/13/pgbench.html#id-1.9.4.10.8. > PGDATABASE is listed in the pages of the psql/pg_dump/createdb... > utilities Yeah, let's fix that. Adding only PGDATABASE to the list of environment variables supported does not look enough to me, so I propose the simple patch attached to clarify what happens to dbname in more details. > 2) In "Common options", it would be useful to add a warning that "-d means > --debug and does NOT define the database, contrary to most other PostgreS= QL > utilities".=20 > (It seems to work and the consequence is a flood of SQL orders on the > screen.) I don't agree with this part. -- Michael --POn96qxKc589seyS Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="pgbench-doc-db.patch" Content-Transfer-Encoding: quoted-printable diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml index faa7c26b0a..2ec0580a79 100644 --- a/doc/src/sgml/ref/pgbench.sgml +++ b/doc/src/sgml/ref/pgbench.sgml @@ -151,6 +151,18 @@ pgbench options = d =20 =20 + + dbname + + + Specifies the name of the database to test in. If this is + not specified, the environment variable + PGDATABASE is used. If that is not set, the + user name specified for the connection is used. + + + + @@ -900,6 +912,7 @@ pgbench options <= /optional> d =20 + PGDATABASE PGHOST PGPORT PGUSER --POn96qxKc589seyS-- --IDp5nWF8U8pckfaz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmA15DsACgkQnvQgOdby QH2MrRAAonGHxFbXQE/x9KZP4BnnkJWeUfI/Yo9xzsaKhXYZASTPUtm+B/WyNlzP 8COLBNls8sz5wYxFQVrIOTPFXojyYCVxZdsnYdxQ1dAYCPm4wItw7ZE7guLe6RlR zRFrdtDancwk2lQDkr/Eu1l6aAauOmlV0LYvJ+IskVfFiH64kuRcfpaDYhXAEdmT qxG/OCEcu8nF9lbCVTQJ7kkQC/8trTuYF4zQ6FDEQAN8qYqEMVH1+zkeSNBSrPUX 0pA+3JgvTMJTPJ7/ciDwWu2F6EDmwLo+eWHIXToGCZiEJJMxUeoHiuwq5vZC9bZu WUpK+o0rrB0hH/nRT8BCmtqP7oZkF4G263sP4VXLyjoBXwmryhdmxifi+pwQ1piU b1bULb8NYQC2k7vV4djE8j2SDqn/IoO5kmRmEfuSnTa7a8QPGEvjF3QytTPkZUgi 1z420XHgUpak4b5EH5V37xNZOQX2U4GvaLykI2lo6vBygBeiaC5HZdsNfh2JDYKa QDiEVAaTsVfT26dul9aFiuQjMCiTfuD4kM7G0oLJ0+fKa9KyKas5B8tGKm37MMv8 IwtE4lm/91uscOmhUAQuWZ3Q5qgQiQiiS7RTrpsvRw//UCx8e/nxnnIBpTB7g5Ki JuBWcPSuK8LjNSJenF3V4VDLBqCOR/OtGdb6AqEtmz4gUo1wVT0= =1AJ5 -----END PGP SIGNATURE----- --IDp5nWF8U8pckfaz--