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 1kbS6R-0006uI-7t for pgsql-hackers@arkaria.postgresql.org; Sat, 07 Nov 2020 17:34:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kbS5u-0006uY-Rh for pgsql-hackers@arkaria.postgresql.org; Sat, 07 Nov 2020 17:33:42 +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 1kbS5u-0006uR-KW for pgsql-hackers@lists.postgresql.org; Sat, 07 Nov 2020 17:33:42 +0000 Received: from sfr-1.cri.mines-paristech.fr ([77.158.180.225] helo=smtp.cri.ensmp.fr) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kbS5n-00063d-KV for pgsql-hackers@postgresql.org; Sat, 07 Nov 2020 17:33:42 +0000 Received: from pseudo (19.237.219.88.rev.sfr.net [88.219.237.19]) by smtp.cri.ensmp.fr (Postfix) with ESMTPSA id 32898C0282; Sat, 7 Nov 2020 18:34:13 +0100 (CET) Date: Sat, 7 Nov 2020 18:33:27 +0100 (CET) From: Fabien COELHO X-X-Sender: fabien@pseudo To: "kuroda.hayato@fujitsu.com" cc: Andres Freund , Daniel Gustafsson , "pgsql-hackers@postgresql.org" Subject: RE: pgbench: option delaying queries till connections establishment? In-Reply-To: Message-ID: References: <20200227180100.zyvjwzcpiokfsqm2@alap3.anarazel.de> <20200227185129.hikscyenomnlrord@alap3.anarazel.de> <20200304174003.ovg5wml4mrgheyio@alap3.anarazel.de> <6AA0DF24-8F6B-4329-AA3B-85B167599747@yesql.se> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello, >> Indeed. I took your next patch with an added explanation. I'm unclear >> whether proceeding makes much sense though, that is some thread would run >> the test and other would have aborted. Hmmm. > > Your comment looks good, thanks. In the previous version pgbench starts > benchmarking even if some connections fail. And users can notice the > connection failure by stderr output. Hence the current specification may > be enough. Usually I run many pgbench through scripts, so I'm probably not there to check a lone stderr failure at the beginning if performance figures are actually reported. > If you agree, please remove the following lines: > > ``` > + * It is unclear whether it is worth doing anything rather than > + * coldly exiting with an error message. > ``` I can remove the line, but I strongly believe that reporting performance figures if some client connection failed thus the bench could not run as prescribed is a bad behavior. The good news is that it is probably quite unlikely. So I'd prefer to keep it and possibly submit a patch to change the behavior. >> ISTM that there is another patch in the queue which needs barriers to >> delay some initialization so as to fix a corner case bug, in which case >> the behavior would be mandatory. The current submission could add an >> option to skip the barrier synchronization, but I'm not enthousiastic to >> add an option and remove it shortly later. > > Could you tell me which patch you mention? Basically I agree what you say, > but I want to check it. Should be this one: https://commitfest.postgresql.org/30/2624/, -- Fabien.