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.96) (envelope-from ) id 1w7Zke-005SUB-0q for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2026 14:07:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w7Zkc-00AVn6-1T for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2026 14:07:26 +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.96) (envelope-from ) id 1w7Zkc-00AVmx-0X for pgsql-hackers@lists.postgresql.org; Tue, 31 Mar 2026 14:07:26 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w7Zka-00000002BSa-0DHL for pgsql-hackers@lists.postgresql.org; Tue, 31 Mar 2026 14:07:26 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4838c15e3cbso48086155e9.3 for ; Tue, 31 Mar 2026 07:07:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774966043; cv=none; d=google.com; s=arc-20240605; b=T4BskR3d3ZMDc6lkziuGvLQXfTl9E7mC1zafW7YbKswBnnvYGfaZbCen25fYtTKR/a 2YCuEdZe/IB16EXcKol3gcy7HIKKG2oVzmKIU06OIRt6/HCDnw05PScXEs1iqEAh9DBm DiW1N9j/ljY3LFZzjAnldtuJHcXJUUCbohHo2P86idQgXV2QzngxiwPZjLzE/J/6Kn7I 8xOYuj/xhvvkcsT3ge7cxZE4HJ7kIthJUn46UaeOzatYo/wxR+NjRLkIeUjO5c9COvbd y0OdMcN49aSn1kPx5RzkKsD/dcputJ0bqW/rEdBCXQ3tBnE3kD/1b0A57QaSnpmPlNSh fl/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=mTENr3LEgIC9i6eg74iySSR9E8JilIBaRDtu4dspBz4=; fh=6TErt01YrVggLztWALvCdCs8vDdrRE+ioSTAh11NYMs=; b=hCD5DtPCK2SBIZ6xzGAeoc4yyZHa9JLwFbdZwD332xCLyzauQB9GUqnClrpw3Urnbp ByqerhZm05h5sGva9FLfil+OJ7443Mwh3vaoXg3nlmxIhsOhOh5wljqTErXlVz7aUsRn dq1QvwhCc3nZ7XG36xu5bWdzlDmOY23BrXEI7vqiiItK56OwJ+RyHUzEkuieKmfEE1J2 PlcLsXYFGPfME40/TrUA0vmK1QacU3qnJpPDEKsVRsbjCN3pQc1UvPlNrd6n2cp4pTLi +K5PvYtymONHGwLB+LvmW4qjpDi+P7P0A9kIniCRHTYCsgF34t2jCHi+lTzmaZ398VQg H83g==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774966043; x=1775570843; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=mTENr3LEgIC9i6eg74iySSR9E8JilIBaRDtu4dspBz4=; b=M1UZy+wmM/SfWVdyM3pYPAftVozwe4zbk2JNt+ffBGrqJD4YaHX0O0KjWPgPSEG6N3 Py83Jt9egQop/qbiVwz67TbrVvW8/UfTccSQkyjo3Zc6ddXDw52/ApvqZ0ExDKB45mQU LHWYFcJgbP4hRkBpsJCv8pkpdRvKz0F3MrE1h89USqXVZWgimSf5w2uJnZmp2edD4oKM eBskkzft15obZ9avJE732LkmHLtetq1kDRuSWBsrwiL7AUx6MT3tGJQgEPfWxowCJftJ uTtLirwU+tLqRD2dIQNxfxCszKQh9bGODNPhSTDubXXWCWhFFRIS73n4CWtAa7BT1r2Q 4j3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774966043; x=1775570843; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=mTENr3LEgIC9i6eg74iySSR9E8JilIBaRDtu4dspBz4=; b=RRGOye4GqS6oogWtkwrX77XklKkb/uCfnS29LzcchXAERtyHnfhF+LawkD8uQNgrF5 tqqzHHIaF5gl4kC4Q2qKZBOLw1q4eERvN1xH4BU5AxlDaYSVhLuC77Ol/dNNWv/DVUAL XI/ktDP6dZua7RPeUxz8OrRU0cHcMpYR2SJ2lOK0hVTSU7Zs2HejXRLMbTdvQXENLzOm jp2XwO1WgItUMbss5R8e4mYavNeSgkxzfJ+I2/AZWvn5tta2wyx41ToS7602BK06p7/j Sas6g5zrqlootCpS2UJFZPDa1IU/haZSvUg6dbMx4n7Um61ZX0GymkUOaAl9xptHM1hz U03g== X-Forwarded-Encrypted: i=1; AJvYcCXugYI2qecP1df86NYFbMKni2Q2gYYrL9lJhAACERa4ItDssI/Ps38Q1NsQU/5VXkp5nZ3INNl0vc+Dca76@lists.postgresql.org X-Gm-Message-State: AOJu0Ywf+QPRgEXmeBAyqmurl4qvd4rh2qRQ0Thcd4yPDllp16X7PpIR P1PscmBnQpDk03ZzGFOza3PQRNLoncfCs5mHWJIdE41UqNkV+TZ/h8iaRRB9kOCij/Fw0HqQVAY JLtWmg79zvG6n34gFa5u/3M9UmQqWOmc= X-Gm-Gg: ATEYQzy27AqP8z8GYSfbyUohmp7pjco3YiNxuxgnuk1YLeLzvb7VRQrg2ezO/BOKZ1G 939t+ChV4OQTpza4ban0F+k5R84b/yBMJhuc4lfNB8oiHG8BACHmBuSTMsgL4vSivPzbTk+f2kv x2L6mclw0j27tSkfOwRbrTxa1ZDGMc24CEJm/JqdiFya/PjV3q6b4vOnVk1ArEuG50oHG2v2aAn icL+4DfzaetY4NTlNvU+wfTdK2Hr8LfGsYiJgNAKcppWXcqqkL+cNIZgYoDnQI9/joQY6LBMHnn Rx49An99hwDj8P58cZhcKIn6Lqfh/AqbgoBHT/2oi3bH+v1S4JSqLRRns9BEd/ssB4NkRP6LVmD i8xPGs/hQ X-Received: by 2002:a05:600c:8819:b0:485:3ff1:d5c5 with SMTP id 5b1f17b1804b1-48727d55fc3mr280700225e9.7.1774966042923; Tue, 31 Mar 2026 07:07:22 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: David Rowley Date: Wed, 1 Apr 2026 03:07:11 +1300 X-Gm-Features: AQROBzBgmkw1rXSMji_E_QzfWYpG0H44q2Xel0YInUx7FJmvuA3ctN4znkLRaic Message-ID: Subject: Re: Get rid of redundant StringInfo accumulation To: Daniil Davydov <3danissimo@gmail.com> Cc: Andres Freund , Postgres hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 1 Apr 2026 at 02:10, Daniil Davydov <3danissimo@gmail.com> wrote: > Most of the fixes cannot be noticeable in the flamegraphs. If the client uses > only WARNING log level in the production then the usefulness of the patch is > obvious for me. So, I think that at first we should consolidate on the issue > above. Do you mean that the new message_level_is_interesting() call isn't noticeable? Or that the extra work to build the StringInfo can't be noticed in an unpatched version? If it's the latter, then what's the point? Your opening email seems to indicate that you noticed the issue from looking at the code. So, it appears that you didn't do this because you noticed that there was an actual measurable overhead and you saw a way to fix it. If that's the case then perhaps you've just assumed this will make a meaningful difference. If I've misunderstood that, please correct me and show us your test cases and the performance results. David