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 1rpVbr-0075Lz-B3 for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Mar 2024 15:54:39 +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 1rpVbq-00GqSD-BB for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Mar 2024 15:54:38 +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 1rpVbq-00GqS0-2A for pgsql-hackers@lists.postgresql.org; Wed, 27 Mar 2024 15:54:38 +0000 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rpVbn-006oZu-3J for pgsql-hackers@lists.postgresql.org; Wed, 27 Mar 2024 15:54:37 +0000 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-56c1922096cso4037318a12.0 for ; Wed, 27 Mar 2024 08:54:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711554874; x=1712159674; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=8VbYTxDwVedMcFw0xc5/L/4FvbzEraIJMVzHzZiiHbI=; b=PiUVXi4m54Bantjv0P/tQ2MYyQwItBRjXdirJtUwpQJjqbyxKCT1MoWxgjElwbUANG 1rdncpNc5Pd2C9ACcAHDGudI8Ds5GiJ9H3ZV4G4k5EGvHVunxU6AFkJz6AhvER2/feYR tSnig0HdbnYegbjWR5qyp5jxAzsy2KMOuTYfD9jZI9dgX3FCGG70M392gr3WDFXtmlWc fbslrG5BoSLiA7JlIkD/G4Dr03evNHO3PbxgXuwDatQlXXvNfXaB0P5zAQ3AjeZM7kui 3biAqHqqqNbsRO9G/giluRSGOp8BL6zMk9t53NhUoj0cSlq23XLzRI0EqqVmSnQSL3jF sFIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711554874; x=1712159674; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8VbYTxDwVedMcFw0xc5/L/4FvbzEraIJMVzHzZiiHbI=; b=wT4/Fxpv0KZvhHYXqSQAb++V0FAmgaxPRDyGXINcG7UeucqrrBaNV3wttbdeojAVPV xchvEP0AoQEmjibdpIHXN07wQyG2wx9eoRs6V3iP4bQ2/Rjlz0nOmMY8LMkNe541x99T B+VvbtgSG6tAUSFLPvmbcBcvuxkk6Wrpfh717/yMvqgd6Xs0oB4BsW5B1LgoZBLoltQb hpb9vxCrAhtjHJ97KLmPKA8aAPO5vE1jA0W4SBnS5ADiQMtAzqzFVxPy/UoRewW2dwbZ TONzcd4353AkvxGZqUtnTEUkBe8QzZDhtWp5WuMBMEMChw6/1/SnQJVAetSliW+o7MaY SX2A== X-Forwarded-Encrypted: i=1; AJvYcCVUvEOhnpwKH4tnpapK5IvYpGBlL+6sQvtbpa8bdXTJsAwKzJ3V3fnFa9gMGHRuqiJZFk11V7k8NP7APEC4CzJX6v1MFYdDCe1LjGRqie6Er4cg X-Gm-Message-State: AOJu0YysaRumVJoylAC7S+L6gnSwNDxlC9YT8w4Da1iL4Mwl5+Vy7u09 W0UXUJvX+aGo/JHrCIOAATxhI1r0arv/JJ113xTTxdEQMMXahb4td8X+Yqycq+skJSKJls/F764 OZneBnUuer3L6NRsqbElyIOEoDsU= X-Google-Smtp-Source: AGHT+IHaGPTOLfL8B/UaEiZW5K5cei+d/fm/vSu4Upu0MXUM6GMno7fofcTucn7uX3qUMmORDKODue4H+XN4S1Znh2w= X-Received: by 2002:a17:906:db07:b0:a46:b99a:7151 with SMTP id xj7-20020a170906db0700b00a46b99a7151mr4207360ejb.17.1711554874013; Wed, 27 Mar 2024 08:54:34 -0700 (PDT) MIME-Version: 1.0 References: <20240201032442.v3vd52kzu3hynamf@awork3.anarazel.de> <20240202223827.5odxkvnh4x6coe7y@awork3.anarazel.de> In-Reply-To: From: Robert Haas Date: Wed, 27 Mar 2024 11:54:22 -0400 Message-ID: Subject: Re: Flushing large data immediately in pqcomm To: David Rowley Cc: Melih Mutlu , PostgreSQL Hackers , Andres Freund , Heikki Linnakangas , Thomas Munro , Jelte Fennema-Nio Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Mar 27, 2024 at 7:39=E2=80=AFAM David Rowley = wrote: > Robert, I understand you'd like a bit more from this patch. I'm > wondering if you planning on blocking another committer from going > ahead with this? Or if you have a reason why the current state of the > patch is not a meaningful enough improvement that would justify > possibly not getting any improvements in this area for PG17? So, I think that the first version of the patch, when it got a big chunk of data, would just flush whatever was already in the buffer and then send the rest without copying. The current version, as I understand it, only does that if the buffer is empty; otherwise, it copies data as much data as it can into the partially-filled buffer. I think that change addresses most of my concern about the approach; the old way could, I believe, lead to an increased total number of flushes with the right usage pattern, but I don't believe that's possible with the revised approach. I do kind of wonder whether there is some more fine-tuning of the approach that would improve things further, but I realize that we have very limited time to figure this out, and there's no sense letting the perfect be the enemy of the good. So in short... no, I don't have big concerns at this point. Melih's latest benchmarks look fairly promising to me, too. --=20 Robert Haas EDB: http://www.enterprisedb.com