Re: log_min_messages per backend type

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: Euler Taveira <euler(at)eulerto(dot)com>, japin <japinli(at)hotmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: log_min_messages per backend type
Date: 2026-02-09 12:40:51
Message-ID: 202602091231.ybwsbdbxsbdo@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
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/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2026-02-09 12:50:03 Re: log_min_messages per backend type
Previous Message jian he 2026-02-09 12:36:14 Re: alter check constraint enforceability