Thread: pgsql: Provide a more accurate, detailed log message when the archive
pgsql: Provide a more accurate, detailed log message when the archive
From
petere@postgresql.org (Peter Eisentraut)
Date:
Log Message: ----------- Provide a more accurate, detailed log message when the archive command fails. Modified Files: -------------- pgsql/src/backend/postmaster: pgarch.c (r1.33 -> r1.34) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/pgarch.c?r1=1.33&r2=1.34)
PostgreSQL fails to compile with Sun Studio 12, due to this new code in backend/postmaster/pgarch.c, more precisely the last line before the #endif (line 506): ----- #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 ----- Note the conditional compile here. The last case appears to have been partly cut-and-pasted from postmaster.c as it refers to the variable 'exitstatus' which does not exist here, I suppose it should have been 'rc'? It does work with Studio 11 (or gcc). Why Studio 12 causes configure to undefine or unset HAVE_DECL_SYS_SIGLIST I haven't investigated. In any case, the above may fail to compile also with other compilers. - Bjorn Munch Sun Microsystems Database Technology Group, Trondheim, Norway
Bjorn Munch <Bjorn.Munch@sun.com> writes: > PostgreSQL fails to compile with Sun Studio 12, due to this new code > in backend/postmaster/pgarch.c, more precisely the last line before > the #endif (line 506): Fixed. regards, tom lane