Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id BE79C9FB2DA for ; Mon, 29 Jan 2007 16:22:14 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 79789-05 for ; Mon, 29 Jan 2007 16:22:08 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from momjian.us (momjian.us [70.90.9.53]) by postgresql.org (Postfix) with ESMTP id 5187B9FB20F for ; Mon, 29 Jan 2007 16:22:07 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id l0TKLtR16529; Mon, 29 Jan 2007 15:21:55 -0500 (EST) From: Bruce Momjian Message-Id: <200701292021.l0TKLtR16529@momjian.us> Subject: Re: [ADMIN] server process (PID xxx) was In-Reply-To: <200701281821.51011.peter_e@gmx.net> To: Peter Eisentraut Date: Mon, 29 Jan 2007 15:21:55 -0500 (EST) CC: Tom Lane , Alvaro Herrera , Achilleas Mantzios , PostgreSQL-patches X-Mailer: ELM [version 2.4ME+ PL123] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ELM1170102115-29781-0_" Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/581 X-Sequence-Number: 389 --ELM1170102115-29781-0_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" Peter Eisentraut wrote: > Tom Lane wrote: > > I don't like that because it parenthesizes the most important part of > > the message, which is a style-guideline violation at least in spirit. > > How about > > > > ... terminated by signal 10: Bus error > > I like that. Patch attached and applied; new message from exec.c and postmaster.c: LOG: server process (PID 27744) was terminated by signal 10: Bus error Nice! -- Bruce Momjian bruce@momjian.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + --ELM1170102115-29781-0_ Content-Transfer-Encoding: 7bit Content-Type: text/x-diff Content-Disposition: inline; filename="/rtmp/diff" Index: src/backend/postmaster/postmaster.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v retrieving revision 1.515 diff -c -c -r1.515 postmaster.c *** src/backend/postmaster/postmaster.c 28 Jan 2007 06:32:03 -0000 1.515 --- src/backend/postmaster/postmaster.c 28 Jan 2007 22:18:25 -0000 *************** *** 2436,2446 **** /*------ translator: %s is a noun phrase describing a child process, such as "server process" */ ! (errmsg("%s (PID %d) was terminated by signal %s (%d)", ! procname, pid, WTERMSIG(exitstatus) < NSIG ? ! sys_siglist[WTERMSIG(exitstatus)] : "(unknown)", ! WTERMSIG(exitstatus)))); #else ereport(lev, --- 2436,2445 ---- /*------ translator: %s is a noun phrase describing a child process, such as "server process" */ ! (errmsg("%s (PID %d) was terminated by signal %d: %s", ! procname, pid, WTERMSIG(exitstatus), WTERMSIG(exitstatus) < NSIG ? ! sys_siglist[WTERMSIG(exitstatus)] : "(unknown)"))); #else ereport(lev, Index: src/port/exec.c =================================================================== RCS file: /cvsroot/pgsql/src/port/exec.c,v retrieving revision 1.53 diff -c -c -r1.53 exec.c *** src/port/exec.c 28 Jan 2007 07:29:32 -0000 1.53 --- src/port/exec.c 28 Jan 2007 22:18:27 -0000 *************** *** 587,595 **** log_error(_("child process was terminated by exception 0x%X"), WTERMSIG(exitstatus)); #elif defined(HAVE_DECL_SYS_SIGLIST) && HAVE_DECL_SYS_SIGLIST ! log_error(_("child process was terminated by signal %s"), ! WTERMSIG(exitstatus) < NSIG ? ! sys_siglist[WTERMSIG(exitstatus)] : "(unknown)"); #else log_error(_("child process was terminated by signal %d"), WTERMSIG(exitstatus)); --- 587,600 ---- log_error(_("child process was terminated by exception 0x%X"), WTERMSIG(exitstatus)); #elif defined(HAVE_DECL_SYS_SIGLIST) && HAVE_DECL_SYS_SIGLIST ! { ! char str[256]; ! ! snprintf(str, sizeof(str), "%d: %s", WTERMSIG(exitstatus), ! WTERMSIG(exitstatus) < NSIG ? ! sys_siglist[WTERMSIG(exitstatus)] : "(unknown)"); ! log_error(_("child process was terminated by signal %s"), str); ! } #else log_error(_("child process was terminated by signal %d"), WTERMSIG(exitstatus)); --ELM1170102115-29781-0_--