]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Allow log_min_messages to be set per process type
authorÁlvaro Herrera <alvherre@kurilemu.de>
Mon, 9 Feb 2026 12:23:10 +0000 (13:23 +0100)
committerÁlvaro Herrera <alvherre@kurilemu.de>
Mon, 9 Feb 2026 12:23:10 +0000 (13:23 +0100)
commit38e0190ced714b33c43c9676d768cc6814fc662a
tree5972624fd4d7bbdc6d3289574389405efea09f54
parentc67bef3f3252a3a38bf347f9f119944176a796ce
Allow log_min_messages to be set per process type

Change log_min_messages from being a single element to a comma-separated
list of type:level elements, with 'type' representing a process type,
and 'level' being a log level to use for that type of process.  The list
must also have a freestanding level specification which is used for
process types not listed, which convenientely makes the whole thing
backwards-compatible.

Some choices made here could be contested; for instance, we use the
process type `backend` to affect regular backends as well as dead-end
backends and the standalone backend, and `autovacuum` means both the
launcher and the workers.  I think it's largely sensible though, and it
can easily be tweaked if desired.

Author: Euler Taveira <euler@eulerto.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Japin Li <japinli@hotmail.com>
Reviewed-by: Tan Yang <332696245@qq.com>
Discussion: https://postgr.es/m/e85c6671-1600-4112-8887-f97a8a5d07b2@app.fastmail.com
13 files changed:
doc/src/sgml/config.sgml
src/backend/commands/extension.c
src/backend/postmaster/launch_backend.c
src/backend/utils/error/elog.c
src/backend/utils/init/miscinit.c
src/backend/utils/misc/guc_parameters.dat
src/backend/utils/misc/guc_tables.c
src/backend/utils/misc/postgresql.conf.sample
src/include/postmaster/proctypelist.h
src/include/utils/guc.h
src/include/utils/guc_hooks.h
src/test/regress/expected/guc.out
src/test/regress/sql/guc.sql