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

From Jakub Wartak
Subject Re: Add errdetail() with PID and UID about source of termination signal
Date
Msg-id CAKZiRmxrS=--uSO_zGoaVhu2Wq8heh-3sYQKriSA_MiZZn_DfQ@mail.gmail.com
Whole thread
In response to Re: Add errdetail() with PID and UID about source of termination signal  (Chao Li <li.evan.chao@gmail.com>)
Responses Re: Add errdetail() with PID and UID about source of termination signal
List pgsql-hackers
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.
Puttwo 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
shouldadhere to the documented style as much as possible. In particular, DETAIL and HINT messages should begin with a
capitalletter 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.

1. Rebased due to recent change to remove bgwriter_die()
2. Added auto-detection of SA_SIGINFO to meson and autoconf
3. Changed "Signal" to be in upper case now (I don't like it, but it
follows guideline now)
4. Tested on FreeBSD 14.3 - it works there too now..
5. ...and fixed some clang warnings by changing %d -> %lld in
errdetail due to apparent pid_t differences on platforms.

-J.

Attachment

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: make ALTER DOMAIN VALIDATE CONSTRAINT no-op when constraint is validated
Next
From: Peter Eisentraut
Date:
Subject: Re: Doc: add XML ID attributes to tags for create_foreign_table, alter_foreign_table