Re: log_min_messages per backend type

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Euler Taveira <euler(at)eulerto(dot)com>
Cc: japin <japinli(at)hotmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Subject: Re: log_min_messages per backend type
Date: 2025-12-09 08:58:52
Message-ID: 202512090853.hk6e6t56bq5z@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

I noticed failures under Windows, and realized that the EXEC_BACKEND
case was busted. That's easy to fix -- just assign MyBackendType in
SubPostmasterMain() as well. With that fix I was still getting some
crashes in three test modules, and after some debugging it turned out
that if you have shared_preload_library with a background worker and use
%b in the log_line_prefix, you get a crash trying to expand a name that
hasn't been set up yet. I figured we can use a constant string in that
case. Better ideas for that string welcome.

So here's your v6 again with those fixes as 0003 -- let's see what CI
thinks of this. I haven't looked at your doc changes yet.

BTW with %b in log_line_prefix, the log file looks ... interesting.

--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
"Before you were born your parents weren't as boring as they are now. They
got that way paying your bills, cleaning up your room and listening to you
tell them how idealistic you are." -- Charles J. Sykes' advice to teenagers

Attachment Content-Type Size
v7-0001-log_min_messages-per-process-type.patch text/x-diff 26.3 KB
v7-0002-Assign-backend-type-earlier.patch text/x-diff 7.0 KB
v7-0003-Fixup-assign-backend-type-earlier.patch text/x-diff 1.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jelte Fennema-Nio 2025-12-09 09:08:49 Re: Proposal to allow setting cursor options on Portals
Previous Message Chao Li 2025-12-09 08:43:25 Re: commented out code