Re: Add errdetail() with PID and UID about source of termination signal

Andrew Dunstan <andrew@dunslane.net>

From: Andrew Dunstan <andrew@dunslane.net>
To: Jakub Wartak <jakub.wartak@enterprisedb.com>, Chao Li <li.evan.chao@gmail.com>
Cc: Jim Jones <jim.jones@uni-muenster.de>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-02-24T16:15:01Z
Lists: pgsql-hackers
On 2026-02-24 Tu 5:05 AM, Jakub Wartak wrote:
> On Tue, Feb 24, 2026 at 9:40 AM Chao Li <li.evan.chao@gmail.com> wrote:
> [..]
>
>> There is guidance in the documentation regarding error message style: https://www.postgresql.org/docs/current/error-style-guide.html
>> ```
>> Detail and hint messages: Use complete sentences, and end each with a period. Capitalize the first word of sentences. Put two spaces after the period if another sentence follows (for English text; might be inappropriate in other languages).
>> ```
>>
>> I also noticed that some existing DETAIL and HINT messages do not fully follow this guideline. But I believe new code should adhere to the documented style as much as possible. In particular, DETAIL and HINT messages should begin with a capital letter and follow the complete-sentence convention.
> Hi, v2 attached, WIP, the only known remaining issue to me is that
> windows might fail to compile as it probably doesn't have concept of
> uid_t... I'm wondering what to do there.


I don't think it will arise, as Windows doesn't have the siginfo stuff, 
AFAIK.


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com




Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Only show signal-sender PID/UID detail in server log

  2. Make psql DETAIL line test unconditionally optional.

  3. Rework signal handler infrastructure to pass sender info as argument.

  4. Add errdetail() with PID and UID about source of termination signal.