"George Pavlov" <gpavlov@mynewplace.com> writes:
>> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]=20
>> What *exactly* is the logging setup you guys use, and have you tried
>> alternatives?
> ... Also redirect_stderr = on.
Hm. Well, that's the bit that ought to get you into the PIPE_BUF
exception. There's been some speculation that a change like the
attached would help. I've found that it makes no difference with
my libc, but maybe yours is different --- want to try it?
regards, tom lane
*** src/backend/utils/error/elog.c.orig Thu May 3 22:01:02 2007
--- src/backend/utils/error/elog.c Fri Jun 1 18:22:49 2007
***************
*** 1788,1794 ****
write_eventlog(edata->elevel, buf.data);
else
#endif
! fprintf(stderr, "%s", buf.data);
}
/* If in the syslogger process, try to write messages direct to file */
--- 1788,1794 ----
write_eventlog(edata->elevel, buf.data);
else
#endif
! write(fileno(stderr), buf.data, buf.len);
}
/* If in the syslogger process, try to write messages direct to file */
***************
*** 2120,2125 ****
--- 2120,2126 ----
#ifndef WIN32
/* On Unix, we just fprintf to stderr */
vfprintf(stderr, fmt, ap);
+ fflush(stderr);
#else
/*