pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: [ADMIN] server process (PID xxx) was
11+ messages / 3 participants
[nested] [flat]
* Re: [ADMIN] server process (PID xxx) was
@ 2007-01-28 01:32 Bruce Momjian <bruce@momjian.us>
2007-01-28 02:24 ` Re: [ADMIN] server process (PID xxx) was Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 11+ messages in thread
From: Bruce Momjian @ 2007-01-28 01:32 UTC (permalink / raw)
To: Bruce Momjian <bruce@momjian.us>; +Cc: Peter Eisentraut <peter_e@gmx.net>; Alvaro Herrera <alvherre@commandprompt.com>; Tom Lane <tgl@sss.pgh.pa.us>; Achilleas Mantzios <achill@matrix.gatewaynet.com>; PostgreSQL-patches <pgsql-patches@postgresql.org>
New log output will look like:
LOG: server process (PID 29304) was terminated by signal: Bus error (10)
---------------------------------------------------------------------------
Bruce Momjian wrote:
> Peter Eisentraut wrote:
> > Bruce Momjian wrote:
> > > Is there no API to return the name of signals?
> >
> > There is, but it's not portable. If someone wants to perform an
> > exercise in writing configure code, look for strsignal() and
> > sys_siglist[].
>
> Good idea. I only have sys_siglist[] on BSD/OS, and Linux and FreeBSD
> have that too, so I only used that. We will now print both signal
> descriptions and numbers for backend error exits, and descriptions only
> for pclose() because we only have a three-argument function to log.
> Attached and applied.
>
> --
> Bruce Momjian bruce@momjian.us
> EnterpriseDB http://www.enterprisedb.com
>
> + If your life is a hard drive, Christ can be your backup. +
[ text/x-diff is unsupported, treating like TEXT/PLAIN ]
> Index: configure
> ===================================================================
> RCS file: /cvsroot/pgsql/configure,v
> retrieving revision 1.530
> diff -c -c -r1.530 configure
> *** configure 18 Jan 2007 14:07:30 -0000 1.530
> --- configure 28 Jan 2007 01:02:58 -0000
> ***************
> *** 15600,15605 ****
> --- 15600,15667 ----
> rm -f conftest.err conftest.$ac_objext \
> conftest$ac_exeext conftest.$ac_ext
>
> + echo "$as_me:$LINENO: checking for sys_siglist" >&5
> + echo $ECHO_N "checking for sys_siglist... $ECHO_C" >&6
> + if test "${pgac_cv_var_sys_siglist+set}" = set; then
> + echo $ECHO_N "(cached) $ECHO_C" >&6
> + else
> + cat >conftest.$ac_ext <<_ACEOF
> + /* confdefs.h. */
> + _ACEOF
> + cat confdefs.h >>conftest.$ac_ext
> + cat >>conftest.$ac_ext <<_ACEOF
> + /* end confdefs.h. */
> + #include <signal.h>
> + int
> + main ()
> + {
> + extern char *sys_siglist[]; (void)sys_siglist[0];
> + ;
> + return 0;
> + }
> + _ACEOF
> + rm -f conftest.$ac_objext conftest$ac_exeext
> + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
> + (eval $ac_link) 2>conftest.er1
> + ac_status=$?
> + grep -v '^ *+' conftest.er1 >conftest.err
> + rm -f conftest.er1
> + cat conftest.err >&5
> + echo "$as_me:$LINENO: \$? = $ac_status" >&5
> + (exit $ac_status); } &&
> + { ac_try='test -z "$ac_c_werror_flag"
> + || test ! -s conftest.err'
> + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
> + (eval $ac_try) 2>&5
> + ac_status=$?
> + echo "$as_me:$LINENO: \$? = $ac_status" >&5
> + (exit $ac_status); }; } &&
> + { ac_try='test -s conftest$ac_exeext'
> + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
> + (eval $ac_try) 2>&5
> + ac_status=$?
> + echo "$as_me:$LINENO: \$? = $ac_status" >&5
> + (exit $ac_status); }; }; then
> + pgac_cv_var_sys_siglist=yes
> + else
> + echo "$as_me: failed program was:" >&5
> + sed 's/^/| /' conftest.$ac_ext >&5
> +
> + pgac_cv_var_sys_siglist=no
> + fi
> + rm -f conftest.err conftest.$ac_objext \
> + conftest$ac_exeext conftest.$ac_ext
> + fi
> + echo "$as_me:$LINENO: result: $pgac_cv_var_sys_siglist" >&5
> + echo "${ECHO_T}$pgac_cv_var_sys_siglist" >&6
> + if test x"$pgac_cv_var_sys_siglist" = x"yes"; then
> +
> + cat >>confdefs.h <<\_ACEOF
> + #define HAVE_SYS_SIGLIST 1
> + _ACEOF
> +
> + fi
> +
> echo "$as_me:$LINENO: checking for syslog" >&5
> echo $ECHO_N "checking for syslog... $ECHO_C" >&6
> if test "${ac_cv_func_syslog+set}" = set; then
> Index: configure.in
> ===================================================================
> RCS file: /cvsroot/pgsql/configure.in,v
> retrieving revision 1.497
> diff -c -c -r1.497 configure.in
> *** configure.in 18 Jan 2007 14:07:31 -0000 1.497
> --- configure.in 28 Jan 2007 01:03:00 -0000
> ***************
> *** 1059,1064 ****
> --- 1059,1073 ----
> AC_MSG_RESULT(yes)],
> [AC_MSG_RESULT(no)])
>
> + AC_CACHE_CHECK([for sys_siglist], pgac_cv_var_sys_siglist,
> + [AC_TRY_LINK([#include <signal.h>],
> + [extern char *sys_siglist[]; (void)sys_siglist[0];],
> + [pgac_cv_var_sys_siglist=yes],
> + [pgac_cv_var_sys_siglist=no])])
> + if test x"$pgac_cv_var_sys_siglist" = x"yes"; then
> + AC_DEFINE(HAVE_SYS_SIGLIST, 1, [Define to 1 if you have the global variable 'char *sys_siglist[]'.])
> + fi
> +
> AC_CHECK_FUNC(syslog,
> [AC_CHECK_HEADER(syslog.h,
> [AC_DEFINE(HAVE_SYSLOG, 1, [Define to 1 if you have the syslog interface.])])])
> Index: src/backend/postmaster/postmaster.c
> ===================================================================
> RCS file: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v
> retrieving revision 1.512
> diff -c -c -r1.512 postmaster.c
> *** src/backend/postmaster/postmaster.c 23 Jan 2007 03:28:49 -0000 1.512
> --- src/backend/postmaster/postmaster.c 28 Jan 2007 01:03:02 -0000
> ***************
> *** 2421,2443 ****
> (errmsg("%s (PID %d) exited with exit code %d",
> procname, pid, WEXITSTATUS(exitstatus))));
> else if (WIFSIGNALED(exitstatus))
> ! #ifndef WIN32
> ereport(lev,
>
> /*------
> translator: %s is a noun phrase describing a child process, such as
> "server process" */
> ! (errmsg("%s (PID %d) was terminated by signal %d",
> ! procname, pid, WTERMSIG(exitstatus))));
> #else
> ereport(lev,
>
> /*------
> translator: %s is a noun phrase describing a child process, such as
> "server process" */
> ! (errmsg("%s (PID %d) was terminated by exception %X",
> ! procname, pid, WTERMSIG(exitstatus)),
> ! errhint("See /include/ntstatus.h for a description of the hex value.")));
> #endif
> else
> ereport(lev,
> --- 2421,2453 ----
> (errmsg("%s (PID %d) exited with exit code %d",
> procname, pid, WEXITSTATUS(exitstatus))));
> else if (WIFSIGNALED(exitstatus))
> ! #if defined(WIN32)
> ereport(lev,
>
> /*------
> translator: %s is a noun phrase describing a child process, such as
> "server process" */
> ! (errmsg("%s (PID %d) was terminated by exception %X",
> ! procname, pid, WTERMSIG(exitstatus)),
> ! errhint("See C include file \"ntstatus.h\" for a description of the hex value.")));
> ! #elif defined(HAVE_SYS_SIGLIST)
> ! ereport(lev,
> !
> ! /*------
> ! 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 signal",
> ! WTERMSIG(exitstatus))));
> #else
> ereport(lev,
>
> /*------
> translator: %s is a noun phrase describing a child process, such as
> "server process" */
> ! (errmsg("%s (PID %d) was terminated by signal %d",
> ! procname, pid, WTERMSIG(exitstatus))));
> #endif
> else
> ereport(lev,
> Index: src/include/pg_config.h.in
> ===================================================================
> RCS file: /cvsroot/pgsql/src/include/pg_config.h.in,v
> retrieving revision 1.108
> diff -c -c -r1.108 pg_config.h.in
> *** src/include/pg_config.h.in 2 Jan 2007 21:25:50 -0000 1.108
> --- src/include/pg_config.h.in 28 Jan 2007 01:03:03 -0000
> ***************
> *** 478,483 ****
> --- 478,486 ----
> /* Define to 1 if you have the <sys/shm.h> header file. */
> #undef HAVE_SYS_SHM_H
>
> + /* Define to 1 if you have the global variable 'char *sys_siglist[]'. */
> + #undef HAVE_SYS_SIGLIST
> +
> /* Define to 1 if you have the <sys/socket.h> header file. */
> #undef HAVE_SYS_SOCKET_H
>
> Index: src/port/exec.c
> ===================================================================
> RCS file: /cvsroot/pgsql/src/port/exec.c,v
> retrieving revision 1.48
> diff -c -c -r1.48 exec.c
> *** src/port/exec.c 23 Jan 2007 03:31:33 -0000 1.48
> --- src/port/exec.c 28 Jan 2007 01:03:05 -0000
> ***************
> *** 582,592 ****
> log_error(_("child process exited with exit code %d"),
> WEXITSTATUS(exitstatus));
> else if (WIFSIGNALED(exitstatus))
> ! #ifndef WIN32
> ! log_error(_("child process was terminated by signal %d"),
> WTERMSIG(exitstatus));
> #else
> ! log_error(_("child process was terminated by exception %X\nSee /include/ntstatus.h for a description of the hex value."),
> WTERMSIG(exitstatus));
> #endif
> else
> --- 582,596 ----
> log_error(_("child process exited with exit code %d"),
> WEXITSTATUS(exitstatus));
> else if (WIFSIGNALED(exitstatus))
> ! #if defined(WIN32)
> ! log_error(_("child process was terminated by exception %X\nSee C include file \"ntstatus.h\" for a description of the hex value."),
> WTERMSIG(exitstatus));
> + #elif defined(HAVE_SYS_SIGLIST)
> + log_error(_("child process was terminated by signal: %s"),
> + WTERMSIG(exitstatus) < NSIG ?
> + sys_siglist[WTERMSIG(exitstatus)] : "unknown signal");
> #else
> ! log_error(_("child process was terminated by signal %d"),
> WTERMSIG(exitstatus));
> #endif
> else
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: [ADMIN] server process (PID xxx) was
2007-01-28 01:32 Re: [ADMIN] server process (PID xxx) was Bruce Momjian <bruce@momjian.us>
@ 2007-01-28 02:24 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-01-28 02:33 ` Re: [ADMIN] server process (PID xxx) was Bruce Momjian <bruce@momjian.us>
0 siblings, 1 reply; 11+ messages in thread
From: Tom Lane @ 2007-01-28 02:24 UTC (permalink / raw)
To: Bruce Momjian <bruce@momjian.us>; +Cc: Peter Eisentraut <peter_e@gmx.net>; Alvaro Herrera <alvherre@commandprompt.com>; Achilleas Mantzios <achill@matrix.gatewaynet.com>; PostgreSQL-patches <pgsql-patches@postgresql.org>
Bruce Momjian <bruce@momjian.us> writes:
>> Good idea. I only have sys_siglist[] on BSD/OS, and Linux and FreeBSD
>> have that too, so I only used that. We will now print both signal
>> descriptions and numbers for backend error exits, and descriptions only
>> for pclose() because we only have a three-argument function to log.
>> Attached and applied.
This patch has broken much of the buildfarm.
regards, tom lane
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: [ADMIN] server process (PID xxx) was
2007-01-28 01:32 Re: [ADMIN] server process (PID xxx) was Bruce Momjian <bruce@momjian.us>
2007-01-28 02:24 ` Re: [ADMIN] server process (PID xxx) was Tom Lane <tgl@sss.pgh.pa.us>
@ 2007-01-28 02:33 ` Bruce Momjian <bruce@momjian.us>
2007-01-28 05:24 ` Re: [ADMIN] server process (PID xxx) was Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 11+ messages in thread
From: Bruce Momjian @ 2007-01-28 02:33 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Peter Eisentraut <peter_e@gmx.net>; Alvaro Herrera <alvherre@commandprompt.com>; Achilleas Mantzios <achill@matrix.gatewaynet.com>; PostgreSQL-patches <pgsql-patches@postgresql.org>
Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> >> Good idea. I only have sys_siglist[] on BSD/OS, and Linux and FreeBSD
> >> have that too, so I only used that. We will now print both signal
> >> descriptions and numbers for backend error exits, and descriptions only
> >> for pclose() because we only have a three-argument function to log.
> >> Attached and applied.
>
> This patch has broken much of the buildfarm.
I think it is because I didn't have #include <signal.h> in exec.c. Added.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: [ADMIN] server process (PID xxx) was
2007-01-28 01:32 Re: [ADMIN] server process (PID xxx) was Bruce Momjian <bruce@momjian.us>
2007-01-28 02:24 ` Re: [ADMIN] server process (PID xxx) was Tom Lane <tgl@sss.pgh.pa.us>
2007-01-28 02:33 ` Re: [ADMIN] server process (PID xxx) was Bruce Momjian <bruce@momjian.us>
@ 2007-01-28 05:24 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-01-28 14:06 ` Re: [ADMIN] server process (PID xxx) was Bruce Momjian <bruce@momjian.us>
0 siblings, 1 reply; 11+ messages in thread
From: Tom Lane @ 2007-01-28 05:24 UTC (permalink / raw)
To: Bruce Momjian <bruce@momjian.us>; +Cc: Peter Eisentraut <peter_e@gmx.net>; Alvaro Herrera <alvherre@commandprompt.com>; Achilleas Mantzios <achill@matrix.gatewaynet.com>; PostgreSQL-patches <pgsql-patches@postgresql.org>
Bruce Momjian <bruce@momjian.us> writes:
> Tom Lane wrote:
>> This patch has broken much of the buildfarm.
> I think it is because I didn't have #include <signal.h> in exec.c. Added.
Doesn't seem to have helped ...
regards, tom lane
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: [ADMIN] server process (PID xxx) was
2007-01-28 01:32 Re: [ADMIN] server process (PID xxx) was Bruce Momjian <bruce@momjian.us>
2007-01-28 02:24 ` Re: [ADMIN] server process (PID xxx) was Tom Lane <tgl@sss.pgh.pa.us>
2007-01-28 02:33 ` Re: [ADMIN] server process (PID xxx) was Bruce Momjian <bruce@momjian.us>
2007-01-28 05:24 ` Re: [ADMIN] server process (PID xxx) was Tom Lane <tgl@sss.pgh.pa.us>
@ 2007-01-28 14:06 ` Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 11+ messages in thread
From: Bruce Momjian @ 2007-01-28 14:06 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Peter Eisentraut <peter_e@gmx.net>; Alvaro Herrera <alvherre@commandprompt.com>; Achilleas Mantzios <achill@matrix.gatewaynet.com>; PostgreSQL-patches <pgsql-patches@postgresql.org>
Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > Tom Lane wrote:
> >> This patch has broken much of the buildfarm.
>
> > I think it is because I didn't have #include <signal.h> in exec.c. Added.
>
> Doesn't seem to have helped ...
It did for some, and using the built-in macro fixed the rest.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: [ADMIN] server process (PID xxx) was
@ 2007-01-28 14:05 Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 11+ messages in thread
From: Bruce Momjian @ 2007-01-28 14:05 UTC (permalink / raw)
To: Peter Eisentraut <peter_e@gmx.net>; +Cc: Alvaro Herrera <alvherre@commandprompt.com>; Tom Lane <tgl@sss.pgh.pa.us>; Achilleas Mantzios <achill@matrix.gatewaynet.com>; PostgreSQL-patches <pgsql-patches@postgresql.org>
Peter Eisentraut wrote:
> Bruce Momjian wrote:
> > New log output will look like:
> >
> > LOG: server process (PID 29304) was terminated by signal: Bus
> > error (10)
>
> The colon doesn't make sense to me.
OK, it seemed strange to say "signal Bus error (10)" because of the
capitalization, but I will remove the colon.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: [ADMIN] server process (PID xxx) was
@ 2007-01-28 14:28 Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 11+ messages in thread
From: Bruce Momjian @ 2007-01-28 14:28 UTC (permalink / raw)
To: Peter Eisentraut <peter_e@gmx.net>; +Cc: Alvaro Herrera <alvherre@commandprompt.com>; Tom Lane <tgl@sss.pgh.pa.us>; Achilleas Mantzios <achill@matrix.gatewaynet.com>; PostgreSQL-patches <pgsql-patches@postgresql.org>
Peter Eisentraut wrote:
> Bruce Momjian wrote:
> > Peter Eisentraut wrote:
> > > Bruce Momjian wrote:
> > > > New log output will look like:
> > > >
> > > > LOG: server process (PID 29304) was terminated by signal: Bus
> > > > error (10)
> > >
> > > The colon doesn't make sense to me.
> >
> > OK, it seemed strange to say "signal Bus error (10)" because of the
> > capitalization, but I will remove the colon.
>
> To make the grammar match better it might be safer to put the text
> inside the parentheses and the number into the sentence. That would
> also work better for translation.
OK. I will also add the number to the exec.c case by snprint into a
local string in that block, and passing that to log_error.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: [ADMIN] server process (PID xxx) was
@ 2007-01-28 22:02 ` Bruce Momjian <bruce@momjian.us>
2007-01-28 23:36 ` Re: [ADMIN] server process (PID xxx) was David Fetter <david@fetter.org>
1 sibling, 1 reply; 11+ messages in thread
From: Bruce Momjian @ 2007-01-28 22:02 UTC (permalink / raw)
To: Peter Eisentraut <peter_e@gmx.net>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Alvaro Herrera <alvherre@commandprompt.com>; Achilleas Mantzios <achill@matrix.gatewaynet.com>; PostgreSQL-patches <pgsql-patches@postgresql.org>
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.
OK, but you guys added back that colon you didn't like. :-)
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: [ADMIN] server process (PID xxx) was
2007-01-28 22:02 ` Re: [ADMIN] server process (PID xxx) was Bruce Momjian <bruce@momjian.us>
@ 2007-01-28 23:36 ` David Fetter <david@fetter.org>
2007-01-29 21:02 ` Re: [ADMIN] server process (PID xxx) was Bruce Momjian <bruce@momjian.us>
0 siblings, 1 reply; 11+ messages in thread
From: David Fetter @ 2007-01-28 23:36 UTC (permalink / raw)
To: Bruce Momjian <bruce@momjian.us>; +Cc: Peter Eisentraut <peter_e@gmx.net>; Tom Lane <tgl@sss.pgh.pa.us>; Alvaro Herrera <alvherre@commandprompt.com>; Achilleas Mantzios <achill@matrix.gatewaynet.com>; PostgreSQL-patches <pgsql-patches@postgresql.org>
On Sun, Jan 28, 2007 at 05:02:24PM -0500, Bruce Momjian wrote:
> 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.
>
> OK, but you guys added back that colon you didn't like. :-)
Placement is crucial. Compare
terminated by signal 10: Bus error <-- proposed version
terminated by signal: 10 Bus error <-- older version
Cheers,
D
--
David Fetter <david@fetter.org> http://fetter.org/
phone: +1 415 235 3778 AIM: dfetter666
Skype: davidfetter
Remember to vote!
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: [ADMIN] server process (PID xxx) was
2007-01-28 22:02 ` Re: [ADMIN] server process (PID xxx) was Bruce Momjian <bruce@momjian.us>
2007-01-28 23:36 ` Re: [ADMIN] server process (PID xxx) was David Fetter <david@fetter.org>
@ 2007-01-29 21:02 ` Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 11+ messages in thread
From: Bruce Momjian @ 2007-01-29 21:02 UTC (permalink / raw)
To: David Fetter <david@fetter.org>; +Cc: Peter Eisentraut <peter_e@gmx.net>; Tom Lane <tgl@sss.pgh.pa.us>; Alvaro Herrera <alvherre@commandprompt.com>; Achilleas Mantzios <achill@matrix.gatewaynet.com>; PostgreSQL-patches <pgsql-patches@postgresql.org>
David Fetter wrote:
> On Sun, Jan 28, 2007 at 05:02:24PM -0500, Bruce Momjian wrote:
> > 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.
> >
> > OK, but you guys added back that colon you didn't like. :-)
>
> Placement is crucial. Compare
>
> terminated by signal 10: Bus error <-- proposed version
> terminated by signal: 10 Bus error <-- older version
FYI, that was not the old version.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: [ADMIN] server process (PID xxx) was
@ 2007-01-29 20:21 ` Bruce Momjian <bruce@momjian.us>
1 sibling, 0 replies; 11+ messages in thread
From: Bruce Momjian @ 2007-01-29 20:21 UTC (permalink / raw)
To: Peter Eisentraut <peter_e@gmx.net>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Alvaro Herrera <alvherre@commandprompt.com>; Achilleas Mantzios <achill@matrix.gatewaynet.com>; PostgreSQL-patches <pgsql-patches@postgresql.org>
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));
^ permalink raw reply [nested|flat] 11+ messages in thread
end of thread, other threads:[~2007-01-29 21:02 UTC | newest]
Thread overview: 11+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-01-28 01:32 Re: [ADMIN] server process (PID xxx) was Bruce Momjian <bruce@momjian.us>
2007-01-28 02:24 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-01-28 02:33 ` Bruce Momjian <bruce@momjian.us>
2007-01-28 05:24 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-01-28 14:06 ` Bruce Momjian <bruce@momjian.us>
2007-01-28 14:05 Re: [ADMIN] server process (PID xxx) was Bruce Momjian <bruce@momjian.us>
2007-01-28 14:28 Re: [ADMIN] server process (PID xxx) was Bruce Momjian <bruce@momjian.us>
2007-01-28 22:02 ` Bruce Momjian <bruce@momjian.us>
2007-01-28 23:36 ` David Fetter <david@fetter.org>
2007-01-29 21:02 ` Bruce Momjian <bruce@momjian.us>
2007-01-29 20:21 ` Bruce Momjian <bruce@momjian.us>
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