X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id C8E6C9FA5DD for ; Fri, 9 Jun 2006 18:01:47 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 87967-05 for ; Fri, 9 Jun 2006 18:01:39 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id EEEBC9FA1A8 for ; Fri, 9 Jun 2006 18:01:38 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k59L1blm024761; Fri, 9 Jun 2006 17:01:37 -0400 (EDT) To: "Chris Hoover" cc: "pgsql-admin@postgresql.org" Subject: Re: Major Problems with PostgreSQL Logs (8.1.3) In-reply-to: <1d219a6f0606091027w554c5b66o38b2ecce5d2ec8f6@mail.gmail.com> References: <1d219a6f0606091027w554c5b66o38b2ecce5d2ec8f6@mail.gmail.com> Comments: In-reply-to "Chris Hoover" message dated "Fri, 09 Jun 2006 13:27:37 -0400" Date: Fri, 09 Jun 2006 17:01:37 -0400 Message-ID: <24760.1149886897@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/86 X-Sequence-Number: 22048 "Chris Hoover" writes: > ---I am having a major problem with the PostgreSQL log files. We have sql > logging turned on for recovery purposes, and have discovered a problem. We > have lines of sql being interrupted by the next log line before they > complete. The interrupting log line is not starting at the beginning of a > line, but rather cutting right into the middle of the previous log line. > Eventually, the intrrupted log line is completed. This is causing serious > issues for us, since we can not rely on the log files to be accurrate. You might try using syslog logging, although I'm not sure whether it would really be much better. If your log messages exceed PIPEBUF (8K typically) then writes to the redirect_stderr process are not going to be atomic, and there's not all that much we can do about it. regards, tom lane