pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: George Pavlov <gpavlov@mynewplace.com>
Cc: Ed L. <pgsql@bluepolka.net>
Cc: pgsql-general@postgresql.org
Subject: Re: query log corrupted-looking entries
Date: Fri, 01 Jun 2007 18:25:13 -0400
Message-ID: <24885.1180736713@sss.pgh.pa.us> (raw)
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>

"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
inline patch 1: src/backend/utils/error/elog.c (+2/-1 lines) download inline-1.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 /*

view thread (30+ messages)  latest in thread

Message-ID: <24885.1180736713@sss.pgh.pa.us>
Permalink:  ../24885.1180736713@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/24885.1180736713@sss.pgh.pa.us

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, gpavlov@mynewplace.com, pgsql@bluepolka.net, pgsql-general@postgresql.org
  Subject: Re: query log corrupted-looking entries
  In-Reply-To: <24885.1180736713@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox