Re: log_min_messages per backend type
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Chao Li <li.evan.chao@gmail.com>
Cc: Euler Taveira <euler@eulerto.com>, japin <japinli@hotmail.com>, Andres Freund <andres@anarazel.de>, pgsql-hackers@lists.postgresql.org
Date: 2026-02-09T12:40:51Z
Lists: pgsql-hackers
On 2026-Feb-09, Chao Li wrote: > While it’s reasonable to configure a full comma-separated list in > postgresql.conf, it seems there’s currently no convenient way for a > superuser to change the log level of a single process type. For > example: > > ``` > evantest=# alter system set log_min_messages='backend:debug4'; > ERROR: invalid value for parameter "log_min_messages": "backend:debug4" > DETAIL: Default log level was not defined. > ``` > > This feels a bit inconvenient in practice. Intuitively, it would be > nice if setting a single type:level could be merged into the existing > log_min_messages value, rather than requiring users to restate the > entire configuration. This has been discussed before and no satisfactory solution has been found. You're welcome to spend time thinking on this; see e.g. https://postgr.es/m/20200928033924.GA998042@toroid.org where not only the details were discussed, but also some links to other threads about the same idea were given. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Cleanup for log_min_messages changes in 38e0190ced71
- 1efdd7cc630a 19 (unreleased) landed
-
Allow log_min_messages to be set per process type
- 38e0190ced71 19 (unreleased) landed
-
Assign "backend" type earlier during process start-up
- 0c8e082fba8d 19 (unreleased) landed
-
Use integer backend type when exec'ing a postmaster child
- f1cd34f95272 19 (unreleased) landed
-
Sort guc_parameters.dat alphabetically by name
- fce7c73fba4e 19 (unreleased) cited
-
Create a separate file listing backend types
- dbf8cfb4f02e 19 (unreleased) cited
-
Replace postmaster.c's own backend type codes with BackendType
- 18d67a8d7d30 18.0 cited