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 1kfVsJ-0003dV-Ps for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Nov 2020 22:24:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kfVsI-0005vA-OQ for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Nov 2020 22:24:26 +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 1kfVod-0002w5-N9 for pgsql-hackers@lists.postgresql.org; Wed, 18 Nov 2020 22:20:39 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kfVoa-00024Z-B6 for pgsql-hackers@postgresql.org; Wed, 18 Nov 2020 22:20:39 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id BFB27580501; Wed, 18 Nov 2020 17:20:34 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 18 Nov 2020 17:20:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=LyPXG9n/omsAXvyQd 1AJuMewj/SIo3aHKUA2LqUFm84=; b=YIVTv5InrUDcDIZ0KfXahl+bPdh+S0DwT tPrgacuBcyJlD94DgVgjBs3Y6C3YfTjQZaRKIFMt4M6EJ7qgJTEgQ70DTR//p77d 09k3CaNMbEJbywdh9ByKYys9g9Lxk4WlrpTVkJx5ofg8EGVIyIFWnIqxqkrI3UGM TF8o0h4jGVSGzrsaABTHB7bb6ZXbNlmySsbnkJwdZIgd8UsapVWnKSHCJsokhd+m eKLFHq7eWXnOcKCjouPKfaYSTR7v4zwnboLfE4r19NcTBrFa+k4+KD1K/LNZQQjK 7MUmihcVlzitLo/jqDJFDZHtSGk9WRhMXohzpuyhSoKgLtz2MZhLA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudefhedgudeiudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkgggtuggjfgesthdtredttdervdenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvefgleevgeeujeeghfegteeghfegheeifeehheelteet ieduieeihffggfehffetnecukfhppeduledtrdelhedrudekrdejleenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghl vhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.18.79]) by mail.messagingengine.com (Postfix) with ESMTPA id 778253064AB2; Wed, 18 Nov 2020 17:20:33 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id D9F262A6190; Wed, 18 Nov 2020 14:51:34 -0300 (-03) Date: Wed, 18 Nov 2020 14:51:34 -0300 From: Alvaro Herrera To: Daniel Verite Cc: "David G. Johnston" , Matthieu Garrigues , Michael Paquier , Dave Cramer , PostgreSQL-development , Craig Ringer , Vaishnavi Prabakaran , Andres Freund , Michael Paquier , Claudio Freire , Heikki Linnakangas Subject: Re: PATCH: Batch/pipelining support for libpq Message-ID: <20201118175134.GA30739@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Nov-14, Daniel Verite wrote: > The patch I posted in [1] was pretty simple, but at the time, query > results were always discarded. Now that pgbench can instantiate > variables from query results, a script can do: > select 1 as var \gset > select :var; > This kind of sequence wouldn't work in batch mode since it > sends queries before getting results of previous queries. > > So maybe \gset should be rejected when inside a batch section. Hah. Hacking pgbench extensively is beyond what I'm willing to do for this feature at this time. Making \gset rejected in a batch section sounds simple enough and supports \beginbatch et al sufficiently to compare performance, so I'm OK with a patch that does that. That'd be a small extension to your previous patch, if I understand correctly. If you or others want to send patches to extend batch support with read-write tracking for variables, feel free, but I hereby declare that I'm not taking immediate responsibility for getting them committed.