Re: Add errdetail() with PID and UID about source of termination signal - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Add errdetail() with PID and UID about source of termination signal
Date
Msg-id 2007157.1776269052@sss.pgh.pa.us
Whole thread
In response to Re: Add errdetail() with PID and UID about source of termination signal  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Add errdetail() with PID and UID about source of termination signal
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> 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



pgsql-hackers by date:

Previous
From: Mihail Nikalayeu
Date:
Subject: Re: Adding REPACK [concurrently]
Next
From: Jacob Champion
Date:
Subject: Re: Add errdetail() with PID and UID about source of termination signal