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 1luJDE-0007Ir-PY for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Jun 2021 18:27:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1luJDD-0004ru-Po for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Jun 2021 18:27:27 +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 1luJDD-0004rh-IN for pgsql-hackers@lists.postgresql.org; Fri, 18 Jun 2021 18:27:27 +0000 Received: from sfr-1.cri.mines-paristech.fr ([77.158.180.225] helo=smtp.cri.ensmp.fr) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1luJDA-0008PU-IR for pgsql-hackers@lists.postgresql.org; Fri, 18 Jun 2021 18:27:26 +0000 Received: from pseudo (185.141.6.84.rev.sfr.net [84.6.141.185]) by smtp.cri.ensmp.fr (Postfix) with ESMTPSA id B8DF1C017B; Fri, 18 Jun 2021 20:29:15 +0200 (CEST) Date: Fri, 18 Jun 2021 20:27:16 +0200 (CEST) From: Fabien COELHO X-X-Sender: fabien@pseudo To: Tom Lane cc: PostgreSQL Developers , Thomas Munro Subject: Re: Version reporting in pgbench In-Reply-To: <1226654.1624036821@sss.pgh.pa.us> Message-ID: References: <1226654.1624036821@sss.pgh.pa.us> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello Tom, > One point here is that printing the server version requires > access to a connection, which printResults() hasn't got > because we already closed all the connections by that point. > I solved that by printing the banner during the initial > connection that gets the scale factor, does vacuuming, etc. Ok. > If you're dead set on not printing the version till the end, > that could be made to happen; but it's not clear to me that > this way is any worse, and it's certainly easier. pgbench (14beta1 dev 2021-06-12 08:10:44, server 13.3 (Ubuntu 13.3-1.pgdg20.04+1)) Why not move the printVersion call right after the connection is created, at line 6374? Otherwise it works for me. -- Fabien.