Re: log_min_messages per backend type
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Euler Taveira <euler@eulerto.com>
Cc: japin <japinli@hotmail.com>, Andres Freund <andres@anarazel.de>, pgsql-hackers@lists.postgresql.org, Chao Li <li.evan.chao@gmail.com>
Date: 2026-01-20T15:43:48Z
Lists: pgsql-hackers
On 2026-Jan-15, Euler Taveira wrote: > On Tue, Dec 9, 2025, at 1:30 PM, Alvaro Herrera wrote: > > BTW another thing I realized while looking this over, is that we quite > > uselessly transform the integer backend type to a string, pass it as a > > string using the --forkchild= argument to the child process, then parse > > the string back to an int to use as an array index. It would be much > > easier to just use the integer value everywhere, as the attached shows. > > > > It is a good simplification. Thanks! Pushed. > There is just one oversight. > > + child_type = (BackendType) atoi(child_kind); > + if (child_type <= B_INVALID || child_type > BACKEND_NUM_TYPES) > elog(ERROR, "unknown child kind %s", child_kind); > > It should be BACKEND_NUM_TYPES - 1. Good catch, thanks. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Digital and video cameras have this adjustment and film cameras don't for the same reason dogs and cats lick themselves: because they can." (Ken Rockwell)
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