| From: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Allow log_min_messages to be set per process type |
| Date: | 2026-02-09 12:28:10 |
| Message-ID: | E1vpQN8-00246r-0P@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(at)eulerto(dot)com>
Reviewed-by: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Reviewed-by: Japin Li <japinli(at)hotmail(dot)com>
Reviewed-by: Tan Yang <332696245(at)qq(dot)com>
Discussion: https://postgr.es/m/e85c6671-1600-4112-8887-f97a8a5d07b2@app.fastmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/38e0190ced714b33c43c9676d768cc6814fc662a
Modified Files
--------------
doc/src/sgml/config.sgml | 52 ++++--
src/backend/commands/extension.c | 2 +-
src/backend/postmaster/launch_backend.c | 2 +-
src/backend/utils/error/elog.c | 247 +++++++++++++++++++++++++-
src/backend/utils/init/miscinit.c | 2 +-
src/backend/utils/misc/guc_parameters.dat | 10 +-
src/backend/utils/misc/guc_tables.c | 13 +-
src/backend/utils/misc/postgresql.conf.sample | 16 +-
src/include/postmaster/proctypelist.h | 42 ++---
src/include/utils/guc.h | 5 +-
src/include/utils/guc_hooks.h | 2 +
src/test/regress/expected/guc.out | 57 ++++++
src/test/regress/sql/guc.sql | 22 +++
13 files changed, 428 insertions(+), 44 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Noah Misch | 2026-02-09 14:16:18 | pgsql: Require PGP-decrypted text to pass encoding validation. |
| Previous Message | Thomas Munro | 2026-02-09 00:08:21 | pgsql: Fix encoding length for EUC_CN. |