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 1wD2j3-002Y7y-0x for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Apr 2026 16:04:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wD2j2-000gVh-17 for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Apr 2026 16:04:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wD2j2-000gVU-08 for pgsql-hackers@lists.postgresql.org; Wed, 15 Apr 2026 16:04:24 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wD2iz-00000001FUo-1zIE for pgsql-hackers@lists.postgresql.org; Wed, 15 Apr 2026 16:04:23 +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 63FG4Cev2007158; Wed, 15 Apr 2026 12:04:12 -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: <30efa6ac-4b7f-43c3-aab6-c0a3c74daac6@dunslane.net> References: <1ba07c75-cc4e-410c-9af1-076feeeb9594@dunslane.net> <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> Comments: In-reply-to Andrew Dunstan message dated "Wed, 15 Apr 2026 11:26:18 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2007156.1776269052.1@sss.pgh.pa.us> Date: Wed, 15 Apr 2026 12:04:12 -0400 Message-ID: <2007157.1776269052@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 10:37 AM, Tom Lane wrote: >> The OpenBSD members of the buildfarm don't seem to like this. > Ugh. > I'm will take a look later today. I reproduced it locally on OpenBSD 7.7. HAVE_SA_SIGINFO is defined, and the code to grab the pid/uid out of siginfo_t is definitely getting compiled. As best I can tell, the kernel is simply passing zero for info->si_pid and si_uid. This does not match up with the info available on the net, so I'm not sure what the issue is. Some googling suggested that on some platforms si_pid will be zero if the process signaled itself, but I can eliminate that theory: it's still zero if I do the pg_terminate_backend() from another session. As a short-term fix, we could just go back to allowing the regex to consider the match optional. regards, tom lane