Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wD5IZ-002aQs-1h for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Apr 2026 18:49:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wD5IY-001YHf-1C for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Apr 2026 18:49:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wD5IY-001YHX-0H for pgsql-hackers@lists.postgresql.org; Wed, 15 Apr 2026 18:49:14 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wD5IW-00000001Bzs-0AE4 for pgsql-hackers@lists.postgresql.org; Wed, 15 Apr 2026 18:49:13 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 63FIn6bJ2100112; Wed, 15 Apr 2026 14:49:06 -0400 From: Tom Lane To: Andrew Dunstan cc: Jakub Wartak , Chao Li , Andres Freund , Jim Jones , PostgreSQL Hackers Subject: Re: Add errdetail() with PID and UID about source of termination signal In-reply-to: References: <9179378a-42db-4315-9ff6-b849ad5eefaf@dunslane.net> <6cj4oxgdpavltoqdbydw2pgxfdbcejc26x3mitasrnswipxne5@7gkaeoibos4l> <71930E58-82A8-4DDC-BA8C-5E394331E463@gmail.com> <43ab327c-3ec7-4424-88de-22c7906e5529@uni-muenster.de> <8B3A69A4-8412-472D-BB39-47617E430420@gmail.com> <833f045b-286a-45dc-aad1-28854cbacc99@dunslane.net> <1997398.1776263852@sss.pgh.pa.us> <30efa6ac-4b7f-43c3-aab6! -c0a3c74daac6@dunslane.net> <2007157.1776269052@sss.pgh.pa.us> Comments: In-reply-to Andrew Dunstan message dated "Wed, 15 Apr 2026 13:20:03 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2100110.1776278946.1@sss.pgh.pa.us> Date: Wed, 15 Apr 2026 14:49:06 -0400 Message-ID: <2100111.1776278946@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andrew Dunstan writes: > On 2026-04-15 We 12:04 PM, Tom Lane wrote: >> As a short-term fix, we could just go back to allowing the regex to >> consider the match optional. > Ok, so we can get the buildfarm green I'll go and do that. But I think > we should have an open item to tighten the test. I did some more digging, and got this from Google's AI Mode: ----- openbsd does not fill siginfo_t si_pid for SIGTERM On OpenBSD, si_pid is indeed not guaranteed to be filled for SIGTERM (and many other signals), even when using SA_SIGINFO. This is a known architectural behavior of the OpenBSD kernel rather than a bug. Why si_pid is zero or empty Minimalist Kernel Design: Unlike Linux, which often populates si_pid and si_uid for most user-sent signals, the OpenBSD kernel only guarantees these fields for specific signals where they are functionally required by POSIX, such as SIGCHLD. Security & Information Leakage: OpenBSD has a history of limiting information available across process boundaries to prevent side-channel attacks or unnecessary information leaks about other processes on the system [0.31]. Signal Queueing: Standard signals like SIGTERM are not "queued" with data in the same way real-time signals (which OpenBSD does not fully support in the same manner as Linux) would be. ----- Now, none of the links it provided in support of these claims say any such thing AFAICS, so maybe this is all an AI hallucination. We could probably look into the OpenBSD kernel to check it, if we were sufficiently motivated. But I'm inclined to believe it and just say "this info is not available on all platforms, even some that HAVE_SA_SIGINFO". regards, tom lane