Re: log_min_messages per backend type
Euler Taveira <euler@eulerto.com>
From: "Euler Taveira" <euler@eulerto.com>
To: "surya poondla" <suryapoondla4@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2026-02-07T01:05:28Z
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]@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]@18
$17 = {14 <repeats 18 times>}
8<-----------------------------------------------------------------8<
postgres=# reset log_min_messages;
RESET
another terminal:
(gdb) p log_min_messages[0]@18
$18 = {19, 21, 19 <repeats 16 times>}
--
Euler Taveira
EDB 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