Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 01DA39FC6FB for ; Fri, 1 Jun 2007 19:25:50 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 48924-01-9 for ; Fri, 1 Jun 2007 19:25:38 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id E50EC9FC6AA for ; Fri, 1 Jun 2007 19:25:36 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l51MPD8u024886; Fri, 1 Jun 2007 18:25:13 -0400 (EDT) To: "George Pavlov" cc: "Ed L." , pgsql-general@postgresql.org Subject: Re: query log corrupted-looking entries In-reply-to: <8C5B026B51B6854CBE88121DBF097A86CDD9D2@ehost010-33.exch010.intermedia.net> References: <29860.1161202644@sss.pgh.pa.us> <8C5B026B51B6854CBE88121DBF097A86C39FC2@ehost010-33.exch010.intermedia.net> <200705291119.55567.pgsql@bluepolka.net> <8C5B026B51B6854CBE88121DBF097A86CDD9A4@ehost010-33.exch010.intermedia.net> <24195.1180733773@sss.pgh.pa.us> <8C5B026B51B6854CBE88121DBF097A86CDD9D2@ehost010-33.exch010.intermedia.net> Comments: In-reply-to "George Pavlov" message dated "Fri, 01 Jun 2007 14:55:41 -0700" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <24874.1180736669.0@sss.pgh.pa.us> Date: Fri, 01 Jun 2007 18:25:13 -0400 Message-ID: <24885.1180736713@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/155 X-Sequence-Number: 114978 ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24874.1180736669.1@sss.pgh.pa.us> "George Pavlov" 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 ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24874.1180736669.2@sss.pgh.pa.us> Content-Description: direct-write-stderr.patch *** 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 /* ------- =_aaaaaaaaaa0--