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 1vGxHQ-009D3s-Hv for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Nov 2025 10:31:47 +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 1vGxHO-0074IG-3I for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Nov 2025 10:31:45 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vGxHN-0074Hy-OW for pgsql-hackers@lists.postgresql.org; Thu, 06 Nov 2025 10:31:44 +0000 Received: from fout-b6-smtp.messagingengine.com ([202.12.124.149]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1vGxHL-005hii-0E for pgsql-hackers@lists.postgresql.org; Thu, 06 Nov 2025 10:31:43 +0000 Received: from phl-compute-11.internal (phl-compute-11.internal [10.202.2.51]) by mailfout.stl.internal (Postfix) with ESMTP id 4CD101D00065; Thu, 6 Nov 2025 05:31:42 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Thu, 06 Nov 2025 05:31:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm1; t=1762425102; x= 1762511502; bh=VjxA6GdnsWq7S1SvjRLV4n9WoS4vgbzXcPSUto+/FLk=; b=o zGQksr9UCvIWC78FWMX2EG7NZFKNuAjwMfmWzPbJmNVKiPmfBcc6B0dPP8AR9+lg 20hyHpZncKwHCHf4sZzs6pRVlk1HxzOpRhgRxdzyctNn7fw4qEgV7Ngir3owArFy Vs9cNzOfBKv/CWxvaitPj0SED7l4kKmjxj3w3HjsiREn/cOX++pFOAOuBVCTjIHb jF1a7NkEGEgfm+x6DSRzOVlE38wXagezqGwKo/08jApE8I9SzWHRgqvJ68asOXK2 FoaWXKQU7FCWq/tJYux0bhmyZJWw5I9dnvQ1JjXIvni2kdOvL9T/t2PFrz1IJXuR sX/hUVRuui2/hcHMA6Vjw== 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:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1762425102; x=1762511502; bh=V jxA6GdnsWq7S1SvjRLV4n9WoS4vgbzXcPSUto+/FLk=; b=ZS6gAHw4Q7EYwa/k/ mFEXtgSVyRqo3AxZA2JXYAyAzmzq0Mo93XoCIEu7wsFMeaZp0YfVAX87LHmu/YvR qscNE6ia5W2EypWfKPEeMHu0/Tu+GBDv0+4sFcVXdEsrvm+0WAxeD7nMJhcQmyBv 5ZuwgdamSU2/gmYtzZaZMJqt03eJag5UXJHwowDfGBii5WrOY/s+1BgCMANdfRt5 p5+y6ZJ+REQndBFdlF26chzTV97l+c0QEgQBCnQtkuZFi1LlNF5yhO5/DqjFbDZ0 T137Efw48vJGMthelHPcZ6aMgxavlDlUzRSSfDeAV3av+Td/lJM+HE6Zt3PJEgvo xLwsQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddukeeiheehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheplmhlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsehkuhhrihhlvghmuhdruggvqeenucggtf frrghtthgvrhhnpeetuedvheffkeevgfeuheevteevkefggedttdeufeeuheduuddthfef fffhjeefffenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgv sehkuhhrihhlvghmuhdruggvpdhnsggprhgtphhtthhopeefpdhmohguvgepshhmthhpoh huthdprhgtphhtthhopegughhrohiflhgvhihmlhesghhmrghilhdrtghomhdprhgtphht thhopehmrghtshdrkhhinhgurghhlhesghhmrghilhdrtghomhdprhgtphhtthhopehpgh hsqhhlqdhhrggtkhgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Nov 2025 05:31:41 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1762425098; bh=KagvQ2UGTD9JPobOVgdkr15rqtH8X8L4VCilUDW2bbs=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=P6eXwrKKKZq99yW65rrdwvhBuBCAk4o9oaV2AR5F8Bg7zVv51O39OsR0lnq6WoYpQ o3FmLhOQa6Q6kNrkTTow7scagW182ENjp9/a13vEWAWBt06AClZMZm87R5+t3GqS75 6soZyuNlLeiwjK/nrA7ysaBHsmiKu+AfS8fmOIwpcxjcf3sIl0XWBD+y747QSHhsDq NGheSIeudmZT+hK+7X6o7epqTpCpUfZ0ggFc3JKjDGRqtYO6AItecy2z2MW1d31eP9 Uo3I9ElPAAiRz25agdP/+DhIW90sBp2uv0wBNlzWabneAmg83k8/p0wUegfiQSegLy HoqB+7+z58IeQ== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id D57FF76; Thu, 06 Nov 2025 12:31:38 +0200 (EET) Date: Thu, 6 Nov 2025 11:31:38 +0100 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Mats Kindahl Cc: David Rowley , pgsql-hackers@lists.postgresql.org Subject: Re: Use stack-allocated StringInfoData Message-ID: <202511061027.6kun3grytx2d@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <71b9d87a-aa3f-4d5e-bc40-e9e4e60e1c82@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-Nov-06, Mats Kindahl wrote: > On 11/5/25 12:01, David Rowley wrote: > > It's not your fault, but check_publications_origin_tables() looks like > > a mess. It seems like excessive use of additional code just to avoid > > two separate ereport() calls. Might be worth a follow-up patch to > > clean that up. > > Yeah, I have noted that too, but I wanted to avoid making reviews more > complicated than necessary. I thought it might be better to do as a separate > effort. Yeah, I came across this a few weeks ago as well. I was thinking maybe we can expand the ereport() macro instead of duplicating things. It looks a bit ugly and I don't think we do it anywhere else ... I mean something like errstart(WARNING, NULL); if (cond) errmsg( ... ); else errmsg( ... ); // and so on errfinish(__FILE__, __LINE__, __func__); Is this too ugly to live? (I swear I had this on a branch already, but can't find it right this instant.) -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "No necesitamos banderas No reconocemos fronteras" (Jorge González)