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 1mNIVu-0006m1-9i for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Sep 2021 17:34:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mNIVr-0007O5-PH for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Sep 2021 17:34:31 +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 1mNIVr-0007Nm-HR for pgsql-hackers@lists.postgresql.org; Mon, 06 Sep 2021 17:34:31 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mNIVk-0005RZ-7x for pgsql-hackers@lists.postgresql.org; Mon, 06 Sep 2021 17:34:30 +0000 Received: from hrk.local (p2388012-ipbf1027funabasi.chiba.ocn.ne.jp [118.6.6.12]) by oss.nttdata.com (Postfix) with ESMTPSA id C979A6088B; Tue, 7 Sep 2021 02:34:17 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.3 at oss.nttdata.com Subject: Re: pgbench bug candidate: negative "initial connection time" To: Yugo NAGATA , Fabien COELHO Cc: Kyotaro Horiguchi , kuroda.hayato@fujitsu.com, PostgreSQL Developers References: <20210617181642.e9b9d9979e6bd3b02fcb3065@sraoss.co.jp> <20210618.172603.409047378314636142.horikyota.ntt@gmail.com> <20210729132325.1f4bb9233f9fa759ca2d9213@sraoss.co.jp> From: Fujii Masao Message-ID: <602fccbd-a8cf-fc0a-da63-faaeb2cfbabe@oss.nttdata.com> Date: Tue, 7 Sep 2021 02:34:17 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210729132325.1f4bb9233f9fa759ca2d9213@sraoss.co.jp> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021/07/29 13:23, Yugo NAGATA wrote: > Hello, > > On Fri, 18 Jun 2021 15:58:48 +0200 (CEST) > Fabien COELHO wrote: > >> Attached Yugo-san patch with some updates discussed in the previous mails, >> so as to move things along. > > I attached the patch rebased to a change due to 856de3b39cf. + pg_log_fatal("connection for initialization failed"); + pg_log_fatal("setup connection failed"); + pg_log_fatal("cannot create connection for client %d", These fatal messages output when doConnect() fails should be a bit more consistent each other? For example, could not create connection for initialization could not create connection for setup could not create connection for client %d I'm not sure, but *if* "xxx failed" is more proper for pgbench, what about connection for initialization failed connection for setup failed connection for client %d failed > Exit status 1 indicates static problems such as invalid command-line options. > Errors during the run such as database errors or problems in the script will > result in exit status 2. While reading the code and docs related to the patch, I found these descriptions in pgbench docs. The first description needs to be updated? Because even database error (e.g., failure of connection for setup) can result in exit status 1 if it happens before the benchmark actually runs. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION