pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Jakub Wartak <jakub.wartak@enterprisedb.com>
Cc: Chao Li <li.evan.chao@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Jim Jones <jim.jones@uni-muenster.de>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Add errdetail() with PID and UID about source of termination signal
Date: Wed, 15 Apr 2026 12:04:12 -0400
Message-ID: <2007157.1776269052@sss.pgh.pa.us> (raw)
In-Reply-To: <30efa6ac-4b7f-43c3-aab6-c0a3c74daac6@dunslane.net>
References: <CFD6C011-7D95-418B-B7BA-5F864F682C83@gmail.com>
	<1ba07c75-cc4e-410c-9af1-076feeeb9594@dunslane.net>
	<cwyyryh2veejuxbj5ifzyaejw7jhhqc5mrdeq56xckknsdecn2@6hzfcxde2nm5>
	<a076e20d-fc56-4b5d-aa47-a52b4e7a5061@dunslane.net>
	<j7gm4f7bx7hprsc6j4tl47nd5r2vfv5aqevco76rsdawvkwfnd@nsbig7xqlqj5>
	<9179378a-42db-4315-9ff6-b849ad5eefaf@dunslane.net>
	<6cj4oxgdpavltoqdbydw2pgxfdbcejc26x3mitasrnswipxne5@7gkaeoibos4l>
	<71930E58-82A8-4DDC-BA8C-5E394331E463@gmail.com>
	<43ab327c-3ec7-4424-88de-22c7906e5529@uni-muenster.de>
	<jygesyr7mwg7ovdbxpmjvvbi3hccptpkcreqb645h7f56puwbz@hmkkwi3melfe>
	<acd7c8a3-9646-4023-8938-d49eb9c6a3f1@dunslane.net>
	<8B3A69A4-8412-472D-BB39-47617E430420@gmail.com>
	<CAKZiRmws3_4xemjzP9kyp=co=gc1GXoZ2VtqZzGuO9-tN8ok8Q@mail.gmail.com>
	<833f045b-286a-45dc-aad1-28854cbacc99@dunslane.net>
	<CAKZiRmwV-46KOYQM5OP4FZWJFqsELAVCTE++_XBHoX8hAFdpAg@mail.gmail.com>
	<d73b6ec7-f053-4175-8b6f-281fcb828899@dunsla! ne.net>
	<1997398.1776263852@sss.pgh.pa.us>
	<30efa6ac-4b7f-43c3-aab6! -c0a3c74daac6@dunslane.net>

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





view thread (54+ messages)  latest in thread

Message-ID: <2007157.1776269052@sss.pgh.pa.us>
Permalink:  ../2007157.1776269052@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2007157.1776269052@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andrew@dunslane.net, jakub.wartak@enterprisedb.com, li.evan.chao@gmail.com, andres@anarazel.de, jim.jones@uni-muenster.de, pgsql-hackers@lists.postgresql.org
  Subject: Re: Add errdetail() with PID and UID about source of termination signal
  In-Reply-To: <2007157.1776269052@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox