Subject: A modest proposal: let's add PID to assertion failure messages

From: Tom Lane <[email-masked]>
Date: Sun, 04 Oct 2020 17:08:07 -0400

In these days when we run almost all test cases in parallel, it's
frequently not that easy to tie a "TRAP: ..." message in the log
to nearby log messages.  (The postmaster's subsequent complaint
often helps, but it could be some distance away in the log; and
good luck untangling things if more than one Assert failure happens
concurrently.)  We could add a simple bread crumb trail by
including the process's PID in such messages.  Any objections?

			regards, tom lane

---

From: Thomas Munro <[email-masked]>
Date: Mon, 5 Oct 2020 10:20:01 +1300

> including the process's PID in such messages.  Any objections?

+1

---

From: Michael Paquier <[email-masked]>
Date: Mon, 5 Oct 2020 09:58:24 +0900

>> including the process's PID in such messages.  Any objections?

+1.  (log_line_prefix includes %p in its default configuration for the
TAP tests).
--
Michael

---

From: Tom Lane <[email-masked]>
Date: Sun, 04 Oct 2020 21:18:24 -0400

> +1.  (log_line_prefix includes %p in its default configuration for the

Right, but of course you don't get log_line_prefix on Assert messages.

			regards, tom lane

---

From: Andres Freund <[email-masked]>
Date: Tue, 6 Oct 2020 11:27:48 -0700

+1