Hi, just a word of warning: it seems as if there is compiler bug in clang regarding the ternary operator when used in ereport(). While working on a patch I found that this code:
ereport(FATAL,
(errmsg("could not map anonymous shared memory:
%m"),
(errno == ENOMEM) ?
errhint("This error usually means that
PostgreSQL's request "
"for a shared memory segment
exceeded available memory "
"or swap space. To reduce the
request size (currently "
"%zu bytes), reduce
PostgreSQL's shared memory usage, "
"perhaps by reducing
shared_buffers or "
"max_connections.",
*size) : 0));
did not emit a errhint when using clang, although errno == ENOMEM was
true. The same code works with gcc. I used the same data dir, so
config was exactly the same, too.
I reported this bug at clang.org:
<http://llvm.org/bugs/show_bug.cgi?id=18644>
Best regards,
--
Christian Kruse http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
pgpA2ZYq2t26Z.pgp
Description: PGP signature
