Re: log_min_messages per backend type

From: "Euler Taveira" <euler(at)eulerto(dot)com>
To: "surya poondla" <suryapoondla4(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: log_min_messages per backend type
Date: 2026-02-07 01:05:28
Message-ID: 083656a8-b389-4a69-9514-7ce7b8144770@app.fastmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Feb 6, 2026, at 5:28 PM, surya poondla wrote:
>
> Quick clarification on how this feature interacts with existing
> per-session and per-role/database GUC settings:
> If I set log_min_messages = 'warning, backend:error' at the cluster
> level:
> 1. Can an individual session still override this with SET
> log_min_messages = DEBUG1?
> 2. Do role/database-level settings (e.g., ALTER ROLE alice SET
> log_min_messages = DEBUG1) still work as expected?
>

Yes. Yes.

> I assume both would override the cluster-level backend:error setting
> following standard GUC precedence rules, but wanted to confirm.
>

This feature doesn't change the GUC context.

postgres=# show log_min_messages;
log_min_messages
------------------------
warning, backend:error
(1 row)

another terminal:

(gdb) p log_min_messages[0](at)18
$16 = {19, 21, 19 <repeats 16 times>}

8<-----------------------------------------------------------------8<

postgres=# set log_min_messages to debug1;
SET

another terminal:

(gdb) p log_min_messages[0](at)18
$17 = {14 <repeats 18 times>}

8<-----------------------------------------------------------------8<

postgres=# reset log_min_messages;
RESET

another terminal:

(gdb) p log_min_messages[0](at)18
$18 = {19, 21, 19 <repeats 16 times>}

--
Euler Taveira
EDB https://www.enterprisedb.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-02-07 02:42:52 Re: Decoupling our alignment assumptions about int64 and double
Previous Message Thomas Munro 2026-02-06 23:39:01 Re: Windows locales and tests portability