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 1rtHVM-00DgiB-1N for pgsql-hackers@arkaria.postgresql.org; Sun, 07 Apr 2024 01:39:32 +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 1rtHVK-001iez-BJ for pgsql-hackers@arkaria.postgresql.org; Sun, 07 Apr 2024 01:39:30 +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 1rtHVK-001ier-1j for pgsql-hackers@lists.postgresql.org; Sun, 07 Apr 2024 01:39:30 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rtHVD-001E2X-4E for pgsql-hackers@lists.postgresql.org; Sun, 07 Apr 2024 01:39:29 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 9AEA63200A00; Sat, 6 Apr 2024 21:39:19 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 06 Apr 2024 21:39:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1712453959; x=1712540359; bh=4LUFzE9eHm KMPV+uyYWrMi90wzkxG4QSlzs+XVQYbjs=; b=NEVIi8eVmPc255JWyxkAZ8FNlo aRDEf1WcI6RxD6OpEf3UzJnHYec0jZTNikJbAxktccj+rfLJkD3Au1HalF7hYSMR QZTtECbgBDhy25bFKT7Gp+8wD6uOax7yb9UKDBEy05xsVH5aEr0CxIShXwGArZ2o 9MHI5x0dbmUsoL+/OH8XrzNSG71rImMRyeFma0L66bXB+Uh2Lzqm/9KhFED3WhvV yAF/u086wpvxcqzQejfECgGsEfel0qjwbDiGk+aYTKSeIE1MnS/ofHJieAgVMB3v 0re23re6dY0V1tg6OlA9QFJppU8uhep4UpaSIsL4ZIUfEMDZOtwMN9SpAl8A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1712453959; x=1712540359; bh=4LUFzE9eHmKMPV+uyYWrMi90wzkx G4QSlzs+XVQYbjs=; b=hCJEWAJw/4oUb26+8znZdqwY5FzQ+x7MDj871N0lXkNE b2bVCR1Y5dx3FvL3rEMd06mYNgwt6bhd4y53HUEbwp0ZRhTIE9F3WTUhRsJxzNaw 3L8Cg2UP4dGjifOwSjvKkJk4vUgI56Uu4RZ0DYBBOiT3VnKp0QFxzbh+Zmu9mwg2 nUuMyvS4UIpnlNgdunFFMLcXhRvBrJSPEQXzScZJhiTDR5m7RAaLxD1K95Bua3yn RLv1bJKGMeHHWxymLeOTrVrDOSKWo0lmbpG9+yWDE9FgpiuR3XryHUurzbc7JLm1 axfCDQC3Fis1PgxyvHcLOpxLR1QlawuEwsP7z5mB+A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudegfedggeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepvdfffeevhfetveffgeeiteefhfdtvdffjeevhfeuteegleduheetvedu ieettddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 6 Apr 2024 21:39:18 -0400 (EDT) Date: Sat, 6 Apr 2024 18:39:17 -0700 From: Andres Freund To: Jelte Fennema-Nio Cc: David Rowley , Melih Mutlu , PostgreSQL Hackers , Heikki Linnakangas , Robert Haas , Thomas Munro , Ranier Vilela Subject: Re: Flushing large data immediately in pqcomm Message-ID: <20240407013917.r5o7qd7flgnepo2n@awork3.anarazel.de> References: <20240406202127.2asud6cjfq3exqew@awork3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2024-04-07 00:45:31 +0200, Jelte Fennema-Nio wrote: > On Sat, 6 Apr 2024 at 22:21, Andres Freund wrote: > > The small regression for small results is still kinda visible, I haven't yet > > tested the patch downthread. > > Thanks a lot for the faster test script, I'm also impatient. I still > saw the small regression with David his patch. Here's a v6 where I > think it is now gone. I added inline to internal_put_bytes too. I > think that helped especially because for two calls to > internal_put_bytes len is a constant (1 and 4) that is smaller than > PqSendBufferSize. So for those calls the compiler can now statically > eliminate the new codepath because "len >= PqSendBufferSize" is known > to be false at compile time. Nice. > Also I incorporated all of Ranier his comments. Changing the global vars to size_t seems mildly bogus to me. All it's achieving is to use slightly more memory. It also just seems unrelated to the change. Greetings, Andres Freund