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 1viDtb-000zC8-0x for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Jan 2026 15:43:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1viDta-001cGb-15 for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Jan 2026 15:43:54 +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 1viDta-001cGT-02 for pgsql-hackers@lists.postgresql.org; Tue, 20 Jan 2026 15:43:54 +0000 Received: from fout-a8-smtp.messagingengine.com ([103.168.172.151]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1viDtX-001RQR-28 for pgsql-hackers@lists.postgresql.org; Tue, 20 Jan 2026 15:43:53 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id 7C048EC00F3; Tue, 20 Jan 2026 10:43:51 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Tue, 20 Jan 2026 10:43:51 -0500 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=fm2; t=1768923831; x=1769010231; bh=8 OLRkYqsrNfDVPD4ArBqi7veSd6LHUyWd61ObYeaB44=; b=lORzgPpyY2KH0gWC0 +VhbzQX8UdBCiZm4Qa3uCekt6z7Kkh+edAXbUS6viSQzTIexbifoe5149RYN7WSc 3cF015MPKhuShuOVZjcwfZ2enZoF2As6Uin6vdFt0Ss8+OKVrLD0t9GG6OIPn7QE /dSR49HfhB4SvvwZYNbQvjf608Q5x3xc+t8p4Ua9GvUQGHZ+kdIA4M9HgGtaDpGb 57ymalYxfqZuhTamEABoFj6ddFx5DPVb6pmlu0glwJjve5LRhz/wiF/pNPJ7vIjO Br6BbIq+pz8CIuFmZDq0gBuHUZPrSiSpFWJRekIYM1Qx5q2n3LeoGypmgU+iuB1Y RS6Sw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddugedtkedtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqne cuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeekfffg udffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomhenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgv rhhrvgesrghlvhhhrdhnohdqihhprdhorhhgpdhnsggprhgtphhtthhopeehpdhmohguvg epshhmthhpohhuthdprhgtphhtthhopegrnhgurhgvshesrghnrghrrgiivghlrdguvgdp rhgtphhtthhopegvuhhlvghrsegvuhhlvghrthhordgtohhmpdhrtghpthhtoheplhhird gvvhgrnhdrtghhrghosehgmhgrihhlrdgtohhmpdhrtghpthhtohepjhgrphhinhhlihes hhhothhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehlih hsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 20 Jan 2026 10:43:50 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1768923828; bh=mV+BZiauY4niV7IHQzAA7WHHQCvyl73v72vPgRCWlYM=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=IC7NBU74WBT3ZVofncgn17vc8CD3yq+/KkW+ZbYb7x4KODtcYdFBOtF2ExHXfohjD 1xZ3GbJVZfpeEnDKyKrSx6wqyTSWizPzxzwxZgRvTDf7B0+g+mrV3/s6+W+bNTmD/A ky4H61rhCbgbOGITKl2ZLB65fhyo7hFLtDUP8H0shCl+BUOWNHyEvgT4T5JYUau7Ef N5ZgVmOVKhkWeDlPEwDuWRhhFdrs0YOWOU+qc06ymiNifAvoBCTgfsZD9SCvq8GUOG 0KHe5JgCIzeiX03kqSF5MeeJO7PPgINJsAq/JXIP1TtvLK6h/1EE7XVOphw3tJqHPw opMmZC9IWqfXw== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 59A837A; Tue, 20 Jan 2026 16:43:48 +0100 (CET) Date: Tue, 20 Jan 2026 16:43:48 +0100 From: Alvaro Herrera To: Euler Taveira Cc: japin , Andres Freund , pgsql-hackers@lists.postgresql.org, Chao Li Subject: Re: log_min_messages per backend type Message-ID: <202601201541.hbzj6ihp7ei4@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <603d4e3e-8aa1-485f-8f0c-3f48822fbf9c@app.fastmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-Jan-15, Euler Taveira wrote: > 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. Thanks! Pushed. > 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. Good catch, thanks. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Digital and video cameras have this adjustment and film cameras don't for the same reason dogs and cats lick themselves: because they can." (Ken Rockwell)