Re: log_min_messages per backend type
Euler Taveira <euler@eulerto.com>
From: "Euler Taveira" <euler@eulerto.com>
To: "Alvaro Herrera" <alvherre@alvh.no-ip.org>
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-22T02:12:19Z
Lists: pgsql-hackers
Attachments
- v9-0001-log_min_messages-per-process-type.patch (text/x-patch) patch v9-0001
- v9-0002-sort-log_min_messages-elements-per-process-type.patch (text/x-patch) patch v9-0002
- v9-0003-Assign-backend-type-earlier.patch (text/x-patch) patch v9-0003
On Sat, Jan 17, 2026, at 7:02 PM, Alvaro Herrera wrote: > > I'm not opposed to this idea, but I think it should be implemented not > by sorting and then moving the first element to the top of the list, but > instead by modifying the cmp function so that the desired order is > achieved directly. So the cmp() should return -1 if element a has no > colon, or 1 if element b has no colon, otherwise return per strcmp. > That way you can remove the foreach() block above, which is icky. > Good idea. The v9 contains this implementation. I also use the StringInfo as you suggested in the other email. The 0003 removed the wrong B_BACKEND assignment pointed in a previous email. This new patchset contains some changes suggested by Japin Li [1] (I didn't change the error message because it adds an extra message to translate). There was a minor issue with a null-terminated string that I fixed too. PS> I didn't change the background worker case that I mentioned in [2]. [1] https://postgr.es/m/MEAPR01MB3031FA1986F3FC91481E28CCB68DA@MEAPR01MB3031.ausprd01.prod.outlook.com [2] https://postgr.es/m/f20103f2-d960-4206-9969-c4a936524ab1@app.fastmail.com -- 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