Tom Lane wrote: > No, you are confusing the cases "called shell was killed by a signal" > and "called command was killed by a signal, which the shell then turned > around and reported to us as exit > 128".
Yes, I had missed that difference. Next try ... -- Peter Eisentraut http://developer.postgresql.org/~petere/
diff -cr ../cvs-pgsql/src/backend/postmaster/pgarch.c ./src/backend/postmaster/pgarch.c *** ../cvs-pgsql/src/backend/postmaster/pgarch.c 2007-11-25 12:39:56.000000000 +0100 --- ./src/backend/postmaster/pgarch.c 2007-12-11 23:28:43.000000000 +0100 *************** *** 484,494 **** * Per the Single Unix Spec, shells report exit status > 128 when a * called command died on a signal. */ ! bool signaled = WIFSIGNALED(rc) || WEXITSTATUS(rc) > 128; ! ereport(signaled ? FATAL : LOG, ! (errmsg("archive command \"%s\" failed: return code %d", ! xlogarchcmd, rc))); return false; } --- 484,518 ---- * Per the Single Unix Spec, shells report exit status > 128 when a * called command died on a signal. */ ! int lev = (WIFSIGNALED(rc) || WEXITSTATUS(rc) > 128) ? FATAL : LOG; ! if (WIFEXITED(rc)) ! { ! ereport(lev, ! (errmsg("archive command failed with exit code %d", WEXITSTATUS(rc)), ! errdetail("The archive command was \"%s\".", xlogarchcmd))); ! } ! else if (WIFSIGNALED(rc)) ! { ! ereport(lev, ( ! #if defined(WIN32) ! errmsg("archive command was terminated by exception 0x%X", WTERMSIG(rc)), ! errhint("See C include file \"ntstatus.h\" for a description of the hexadecimal value."), ! #elif defined(HAVE_DECL_SYS_SIGLIST) && HAVE_DECL_SYS_SIGLIST ! errmsg("archive command was terminated by signal %d: %s", ! WTERMSIG(rc), ! WTERMSIG(rc) < NSIG ? sys_siglist[WTERMSIG(rc)] : "(unknown)"), ! #else ! errmsg("archive command was terminated by signal %d", WTERMSIG(exitstatus)), ! #endif ! errdetail("The archive command was \"%s\".", xlogarchcmd))); ! } ! else ! { ! ereport(lev, ! (errmsg("archive command exited with unrecognized status %d", rc), ! errdetail("The archive command was \"%s\".", xlogarchcmd))); ! } return false; }
---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly