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 1vpQvD-008LYP-1J for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Feb 2026 13:03:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vpQvC-00AjO6-14 for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Feb 2026 13:03:22 +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 1vpQvC-00AjNx-05 for pgsql-hackers@lists.postgresql.org; Mon, 09 Feb 2026 13:03:21 +0000 Received: from fhigh-a3-smtp.messagingengine.com ([103.168.172.154]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vpQv9-00000001ooh-2J6O for pgsql-hackers@lists.postgresql.org; Mon, 09 Feb 2026 13:03:21 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 4D9B41400056; Mon, 9 Feb 2026 08:03:18 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Mon, 09 Feb 2026 08:03:18 -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=fm3; t=1770642198; x=1770728598; bh=z l6G0XVYMZEKMZpzCulf/9G74NYK2KASXdVjYlx9Uuc=; b=PA5S3gJCCZEssXy3L 8bUzQYXietQ9t95iVarDfD5yVsLKoyzv5FE3vPxAaymHINU2nTjJDx1jLWUiyJvv n1qbPsQIJtn1G+lIV7GTwc22y+IF1/Z2HiVTTVlzYziHznnvCBXZ9t7MnhfcQIK7 1oP8bEc/QP/Nmvw7uE9g7s+19Y5HIr4fGVBX/rx3jVJYH4xJV1Po7TFDI5/sQiq+ 4vVjw7mVzJOJZnEXq/D03my7FR6NdNt+SVMXSCYS0gyjALtHrVmv0PW8MmE8PlFA BuWTHk1oSRaOwvajvX4TQeVOShe+eTZ/npuN3lx41vyHWb9eScsm/+xendGlD9Ka W9Jig== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduleeikeekucetufdoteggodetrf 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; Mon, 9 Feb 2026 08:03:17 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1770642196; bh=UsIETETDAtOupYxVNWO/GJyq38C4NwbaE/L+QdeysBY=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=E9+POnssAARcrtfiwyof9VSOPYwLnOe6xwMOrW366yo+h7LzwKU7iHR5+giFcYQ8/ 4Kr8iz60yLH9zq3rPQ5wCNPoIzXdTNCdfZH6ae13BX79pC3WWTi5pbuvfQ3woZfKFa WZLZAVBIwOBxAa2Z1Q99WtcmK5RkODFefp+DjlqenKiaNcjBh60Ww9B4pyFF5fWUCg PfVTjjwZrAQ+jHLz0v98RezTYuyfpvZ/ZzXJvYTJvA3OQyaAcqiVRVTK+oZxHDz+Yj Zo5sUsA9+8kGaYOwjHTwIDyYv1Fx94wNrDiLQgQkIX4Z/kkyXaQVEra129VEHXtCTT uLyoO+5rjcvlg== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id B9B0C7A; Mon, 09 Feb 2026 14:03:16 +0100 (CET) Date: Mon, 9 Feb 2026 14:03:16 +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: <202602091301.qogmz6asejuy@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202602091250.genyflm2d5dw@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-Feb-09, Alvaro Herrera wrote: > I just pushed this, and somehow I forgot to squash this into the commit. > I don't think it matters terribly much though, so I'm going to hang onto > this for a while in case some bug is found. Euler mentioned offlist that I also forgot to remove log_min_messages_process_types from guc.h. So that gives us this patch for now. diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c index 129906e2daa..59315e94e3e 100644 --- a/src/backend/utils/error/elog.c +++ b/src/backend/utils/error/elog.c @@ -2190,7 +2190,7 @@ check_log_min_messages(char **newval, void **extra, GucSource source) char *result; int newlevel[BACKEND_NUM_TYPES]; bool assigned[BACKEND_NUM_TYPES] = {0}; - int genericlevel = -1; /* -1 means not assigned */ + int defaultlevel = -1; /* -1 means not assigned */ const char *const process_types[] = { #define PG_PROCTYPE(bktype, bkcategory, description, main_func, shmem_attach) \ @@ -2228,8 +2228,8 @@ check_log_min_messages(char **newval, void **extra, GucSource source) const struct config_enum_entry *entry; bool found; - /* Reject duplicates for generic log level. */ - if (genericlevel != -1) + /* Reject duplicates for default log level. */ + if (defaultlevel != -1) { GUC_check_errdetail("Redundant specification of default log level."); goto lmm_fail; @@ -2241,7 +2241,7 @@ check_log_min_messages(char **newval, void **extra, GucSource source) { if (pg_strcasecmp(entry->name, elem) == 0) { - genericlevel = entry->val; + defaultlevel = entry->val; found = true; break; } @@ -2331,9 +2331,9 @@ lmm_fail: } /* - * The generic log level must be specified. It is the fallback value. + * The default log level must be specified. It is the fallback value. */ - if (genericlevel == -1) + if (defaultlevel == -1) { GUC_check_errdetail("Default log level was not defined."); guc_free(rawstring); @@ -2345,7 +2345,7 @@ lmm_fail: for (int i = 0; i < BACKEND_NUM_TYPES; i++) { if (!assigned[i]) - newlevel[i] = genericlevel; + newlevel[i] = defaultlevel; } /* diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h index 8acbdba7ff5..c46203fabfe 100644 --- a/src/include/utils/guc.h +++ b/src/include/utils/guc.h @@ -329,8 +329,6 @@ extern PGDLLIMPORT bool trace_sort; extern PGDLLIMPORT bool optimize_bounded_sort; #endif -extern PGDLLIMPORT const char *const log_min_messages_process_types[]; - /* * Declarations for options for enum values * -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "I suspect most samba developers are already technically insane... Of course, since many of them are Australians, you can't tell." (L. Torvalds)