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 1vgNkK-00BcXB-2i for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jan 2026 13:50:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vgNkJ-00H9t2-32 for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jan 2026 13:50:44 +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.96) (envelope-from ) id 1vgNkJ-00H9sl-0v for pgsql-hackers@lists.postgresql.org; Thu, 15 Jan 2026 13:50:43 +0000 Received: from fout-b8-smtp.messagingengine.com ([202.12.124.151]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vgNkG-000ZQY-2a for pgsql-hackers@lists.postgresql.org; Thu, 15 Jan 2026 13:50:42 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id F06E71D000A7; Thu, 15 Jan 2026 08:50:40 -0500 (EST) Received: from phl-imap-05 ([10.202.2.95]) by phl-compute-06.internal (MEProxy); Thu, 15 Jan 2026 08:50:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eulerto.com; h= cc:cc:content-transfer-encoding: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=fm3; t=1768485040; x=1768571440; bh=SEchvnJh0893efNCRgnNcXreSA2aRYoOPuHQwsdUIU0=; b= ts+q3pL7RNV9HSGQjEG/26SMp9eXL7v2SYA+3ZeoGVOJViYA297HhCfPNrIgRf78 mkxpmbXH+jnGzoTUmfJPYwx8B7o/2CIE2CPg1+Mfw+bThIM3FmIAnvin7ZMA0w/k r1HpAxETmwMBOjBklGodthrVbmoG2LUj/2mPM+DPflEeYq+eK9UJ9ULA9cgm+plt +I0IIONTuA07AQtN2/GE7iIh6+dJkUInt0M7s+AeAswnQBXIy8RWNZKsFodHPxQB lqNk7fwRDdY9kKa0Q6TbAYsozEkwPfQt2oe1HgdjF+oxFYsKyatKfqJBf6DUMzu9 kF4fHorFgMVMW8k/kQTTIw== 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 :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1768485040; x= 1768571440; bh=SEchvnJh0893efNCRgnNcXreSA2aRYoOPuHQwsdUIU0=; b=c wdpXcArIV9aPxsvSJwdllWofcrWGYu0Dn0t+lME/9h7uwjdKuRxcoi2nmiEtkQlz 3o/p/W4zZnWZ93tUG4YHUbK3iXrgEqdlwW37DkFa9HijjUMbxgElugPRsQEoFtWZ vnRvb2ShHP7ofGlZOUZl9e7WW1PUAhgkbm2mGgiRdSPqzw4i8Q59t04dFlOBSjql sk25i9RuJwqKEN9kRKzUG8QSTQErF77qSeB8bWGYKajlDhWeGVLReTAh/vc6k9px MqbyFNIP/K7FKkkXfVUFFCtc+tX6A0kGX+UkV8GFkbAy7csZvuVmx4LNFuHTRV+2 g5AYJE/zS86e4QV63+l8A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduvdeivddvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvfevkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedfgfhulhgv rhcuvfgrvhgvihhrrgdfuceovghulhgvrhesvghulhgvrhhtohdrtghomheqnecuggftrf grthhtvghrnhepleevgfeileegfffglefgfeefffeghfefvdeftdduvdffieeijeffudel iefhvdevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomhenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegvuhhlvghrsegvuhhl vghrthhordgtohhmpdhnsggprhgtphhtthhopeehpdhmohguvgepshhmthhpohhuthdprh gtphhtthhopegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgpdhrtghpthht oheprghnughrvghssegrnhgrrhgriigvlhdruggvpdhrtghpthhtoheplhhirdgvvhgrnh drtghhrghosehgmhgrihhlrdgtohhmpdhrtghpthhtohepjhgrphhinhhliheshhhothhm rghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhsrd hpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i0c21471d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 6F86A182007A; Thu, 15 Jan 2026 08:50:40 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface MIME-Version: 1.0 X-ThreadId: AGl55nTq-Okk Date: Thu, 15 Jan 2026 10:50:00 -0300 From: "Euler Taveira" To: "Alvaro Herrera" Cc: japin , "Andres Freund" , pgsql-hackers@lists.postgresql.org, "Chao Li" Message-Id: <603d4e3e-8aa1-485f-8f0c-3f48822fbf9c@app.fastmail.com> In-Reply-To: <202512090935.k3xrtr44hxkn@alvherre.pgsql> References: <202512090935.k3xrtr44hxkn@alvherre.pgsql> Subject: Re: log_min_messages per backend type Content-Type: text/plain Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Dec 9, 2025, at 1:30 PM, Alvaro Herrera wrote: > BTW another thing I realized while looking this over, is that we quite > uselessly transform the integer backend type to a string, pass it as a > string using the --forkchild= argument to the child process, then parse > the string back to an int to use as an array index. It would be much > easier to just use the integer value everywhere, as the attached shows. > It is a good simplification. There is just one oversight. + child_type = (BackendType) atoi(child_kind); + if (child_type <= B_INVALID || child_type > BACKEND_NUM_TYPES) elog(ERROR, "unknown child kind %s", child_kind); It should be BACKEND_NUM_TYPES - 1. -- Euler Taveira EDB https://www.enterprisedb.com/