Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r0lIg-007gcJ-B3 for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Nov 2023 16:21:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1r0lIe-005nFy-N3 for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Nov 2023 16:21:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r0lIe-005nFp-2h for pgsql-hackers@lists.postgresql.org; Wed, 08 Nov 2023 16:21:04 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r0lIZ-005NSy-UK for pgsql-hackers@postgresql.org; Wed, 08 Nov 2023 16:21:03 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 561535C0186; Wed, 8 Nov 2023 11:20:57 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 08 Nov 2023 11:20:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1699460457; x= 1699546857; bh=zGXv0S4aZFQzi1Bwxy5Z64rC57H/867mfbqYVyc163w=; b=g BOfmgiXjG8wsKZ1lR2JVTFB6pixarRT+s1eWtO8kW1Q6nV4UhcSyGU6eDVexrzal ez2t1e5ZLviOubfvMUH6DTzgXXLhXQoHlG8F17QPilobfWyS1Kgbiw392jLx+y/e 6dITNwunJ5SBhc0ahgey+4VxFR5DXN5fgr1Fnwa6VYyqGnlz2ez4mpd2OOVXpJo9 qcTVwQk+VdDrf0M+gzrFDhYWDq3r4Bn5ENrGHAAOYEt4VXFF0yB74OpGJCP2/jpE rqBZLzKhZ6weaZ+OS8fCQErmPjlkFqY12g772U+LSrLn2PBy/dvAWr69aCPWhROA j4kv0nti3u7acwfSU5O0w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudduledgkeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 8 Nov 2023 11:20:56 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1699460454; bh=Dx6r9A8Y/ehvdqfw7rece+XaDzpymN/Eamn4r5sRmKE=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=BNsrFkLWDEu/F8bpK8Uf35GksuJOef0wA4FNYekoCP/hXK0LjKfosElzVtHkDOUd3 HXljfjlP6S3hTlgP9TOIzVMFhkxqv5QWQEeY24jlJpjfC4AejXqMuw5m3EdiVJuE1X mPVrUWL013zHUHS73q+bKe1566iLKSrmK1Yd4FKmhgMpKwDZ/C0G6UZ5dAN9l3/2NI oFeSGfLdz6M5ytGP0BTn9bh3baDxYAY8Kr1suAvV0KiyNra7jF2xV0F2H8eH5sE3Ro m5N2aOHYKGDdJfv1JUN7f4tyQPQLwyQ6hgHp71awZG5IsAX+pbKVLcU08gx7NNnYg4 Zpu/9VRHLKIQg== Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id F1BEAC1; Wed, 8 Nov 2023 17:20:54 +0100 (CET) Date: Wed, 8 Nov 2023 17:20:54 +0100 From: Alvaro Herrera To: Jelte Fennema-Nio Cc: Robert Haas , Michael Paquier , Anton Kirilov , pgsql-hackers@postgresql.org Subject: Re: Add PQsendSyncMessage() to libpq Message-ID: <202311081620.s2a7ao5jtlpe@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-Nov-07, Jelte Fennema-Nio wrote: > I think this function should be named something with the "PQsend" > prefix since that's the way we name all our public async message > sending functions in libpq. The "Put" word we only use in internal > libpq functions, so I feel it has no place in the external API > surface. My proposal would be to call the function PQsendPipelineSync > (i.e. having the PQsend prefix while still looking similar to the > existing PQpipelineSync). Argued that way, it makes sense to me. > Also I think the flag argument is completely unnecessary. [...] > Instead of looking at it as adding another version of our current > PQpipelineSync API, we should look at it as an addition to our current > list of PQsend functions for a new packet type. And none of those > PQsend functions ever needed a flag. True. > Finally, I have one suggestion for a behavioural change: I think the > function should still call pqPipelineFlush, just like all of our other > PQsend functions (except PQsendFlushRequest, but that seems like an > oversight there too). I agree. So, yeah, it looks like this will be pretty similar to Anton's original patch, with PQpipelineSync() being just PQsendPipelineSync() + PQflush(). -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "In fact, the basic problem with Perl 5's subroutines is that they're not crufty enough, so the cruft leaks out into user-defined code instead, by the Conservation of Cruft Principle." (Larry Wall, Apocalypse 6)