From: Bruce Momjian <bruce@momjian.us>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Achilleas Mantzios <achill@matrix.gatewaynet.com>
Cc: PostgreSQL-patches <pgsql-patches@postgresql.org>
Subject: Re: [ADMIN] server process (PID xxx) was
Date: Mon, 29 Jan 2007 15:21:55 -0500 (EST)
Message-ID: <200701292021.l0TKLtR16529@momjian.us> (raw)
In-Reply-To: <200701281821.51011.peter_e@gmx.net>
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. +
Attachments:/rtmp/diff (text/x-diff, 2.3K) download
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));
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-sql@postgresql.org
Cc: bruce@momjian.us, peter_e@gmx.net, tgl@sss.pgh.pa.us, alvherre@commandprompt.com, achill@matrix.gatewaynet.com, pgsql-patches@postgresql.org
Subject: Re: [ADMIN] server process (PID xxx) was
In-Reply-To: <200701292021.l0TKLtR16529@momjian.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