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 1vLffo-006hOl-1Q for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Nov 2025 10:44: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 1vLffm-00CCFm-2V for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Nov 2025 10:44:27 +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 1vLffm-00CCFe-0L for pgsql-hackers@lists.postgresql.org; Wed, 19 Nov 2025 10:44:26 +0000 Received: from fout-a6-smtp.messagingengine.com ([103.168.172.149]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vLffj-000LP8-1D for pgsql-hackers@lists.postgresql.org; Wed, 19 Nov 2025 10:44:26 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfout.phl.internal (Postfix) with ESMTP id 4683BEC0219; Wed, 19 Nov 2025 05:44:20 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Wed, 19 Nov 2025 05:44:20 -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=1763549060; x=1763635460; bh=A 13ZL+ZMkTHE3nLlVOc9yZGEU+EmiFalW+LiR1YwuDc=; b=D5jjzKItiJ/D6B2ly dFuTYk2iVVCmf5fgGSOn/em8LmF78s+hF4b21l4mtjW+caaCTDA7yQLlBd8aBtud 6Pan9dToHAzpzBjosDAylNLz5rx9f2DqXoA8zDhB1ZyEQtd4bZtC1e+gSQADf7gk 2vNLq5fJe22sdtCnKOS3/jz5MEdxQfeEQEkgO6eBIX4sLbbxlt9Eq1DggTm8Dduo nn33zuuJdQfd675lE2dqQtxmTytdo7Q80W7Z6vl2KeTZqhd9SZBxPUbBOXuj5FvR OfTeniC+tQCi3dKnEJcBNL311FPErhBOX6suZpvRX9FdV8ty/i1EWwwiE/ULKnTM noZ/A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvvdefleelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqne cuggftrfgrthhtvghrnhepueeiteelkeduteeugfegffeltefgkefhgfeftdetfedutedv tdetgeejffetieevnecuffhomhgrihhnpeguvggsihgrnhdrnhgvthdpvghnthgvrhhprh hishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrghdpnhgspghrtg hpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprghnughrvghssegr nhgrrhgriigvlhdruggvpdhrtghpthhtohepvghulhgvrhesvghulhgvrhhtohdrtghomh dprhgtphhtthhopehjrghpihhnlhhisehhohhtmhgrihhlrdgtohhmpdhrtghpthhtohep phhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Nov 2025 05:44:19 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1763549057; bh=ZdUm3WNoS/J6ivGylnFVkBqzQ4e61/8QdjlYoYSc58Q=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=DkzqQsnXRe8tUPYyXKDc/m33Z1bcZsA83+TSP9P/CgB1HKHcLDfHpaGbZeNQhPhcz qamfndlhNZ9JAcio8fZ3qtwPEcETfPIhWiQXyyQyjzSU37I0U0F7EXO/k2SryVbe5A TE3qZHouyN5wr+EhMESt/hor01V/uih1wl+CvsDoQ2OJIcmgtcSwSuTf4kUfsvL56U RkDUiVrd7aDGLC0S+RT/wK6BPrnYtMcwiQlveIFIXXPksmEvC2xxylz8snIDOLJogy RTk1z81mRcuVm5+Owd1fvhNQQd1RgMpOHMWsYn6AwIw1NgHoVKVkXCqI8xx7gDzR75 FVNLViBglrMuw== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 9E95676; Wed, 19 Nov 2025 11:44:17 +0100 (CET) Date: Wed, 19 Nov 2025 11:44:17 +0100 From: Alvaro Herrera To: Euler Taveira Cc: japin , Andres Freund , pgsql-hackers@lists.postgresql.org Subject: Re: log_min_messages per backend type Message-ID: <202511191005.57xh2abe6zrx@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6201c638-92e2-46dd-b022-9cde55727b05@app.fastmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-Nov-18, Euler Taveira wrote: > On Thu, Nov 6, 2025, at 1:01 PM, Alvaro Herrera wrote: > See miscadmin.h. > > /* > * MyBackendType indicates what kind of a backend this is. > * > * If you add entries, please also update the child_process_kinds array in > * launch_backend.c. > */ > typedef enum BackendType > > The "backend type" terminology is exposed. Something appearing in the source code does not equate it being exposed to end users. Things are exposed when they are in the documentation, or when the SQL interface requires you to use the term. So I don't think the fact that BackendType appears in the code forces us to use that name in the user-visible interface now. In the glossary, we talk about "processes"; in the definitions there, "backend" is one type of process. So in this list of "backend types" that you want to introduce, what you really should be talking about is "process types", where "backend" is one of the options. > It is even available in the > pg_stat_activity view. I agree that "backend" is not a good name to define a > Postgres process. I don't think we should be inconsistent only in this patch. > Even if the proposal is to rename enum BackendType (I won't propose it as part > of this patch), it would make some extension authors unhappy according to > codesearch.debian.net. I don't think we should rename the BackendType enum. That's in the source code, not in the documentation or the SQL interface, so we don't need to care. > > I think the list of backend types is pretty hard to read. What do you > > think about using > > > > to create a friendlier representation? > > I tried but didn't like the result. See the attached image. Well, I like it very much. The original is a solid wall of text, very hard to read, where you have to squint hunting commas in order to distinguish one item from the next. (Maybe you are young and have good eyesight, but you won't be young forever.) In the screenshot you show, the list of possible process types to use is nicely separated, which makes it very easy to catch at a glance. Maybe remove "the table", which is obviously inappropriate, and just say "Valid process types are listed below, each corresponding to either postmaster, an auxiliary process type or a backend". (Note your original wording says "a backend type, corresponding to [blah blah] or a backend" which makes no sense -- how is a backend a type of backend? It isn't. It's a type of process.) > You said table but it is a multi-column list; it doesn't contain a > header or borders. Right. You don't need a full-blown table here: this simple list is perfectly adequate. > Good question. The current patch uses "backend" to B_INVALID (that's exactly the > MyBackendType for postmaster -- see below). I think it is reasonable to create a > new category "postmaster" and assign it to B_INVALID. I guess that would work, but I think it's inadequate. Maybe we could add a new value B_POSTMASTER and have postmaster switch to that as early as possible. Then anything that still has B_INVALID must necessarily be an improperly identified process. Users wouldn't assign a value to that one (the GUC wouldn't let you); instead those would always use the default value. Hopefully nobody would see that very often, or at all. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/