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 AEC899FA5F8 for ; Fri, 9 Jun 2006 19:48:40 -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 94907-10 for ; Fri, 9 Jun 2006 19:48:35 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.207]) by postgresql.org (Postfix) with ESMTP id E979F9FA38F for ; Fri, 9 Jun 2006 19:48:34 -0300 (ADT) Received: by wx-out-0102.google.com with SMTP id h30so590323wxd for ; Fri, 09 Jun 2006 15:48:33 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=YKBjMq0tvv4ct8dZsWFmsPZTr3qyFkhGRpt4OZYnpXebs8OKzGUdRStSMNTVt/xGhLseogBl3mgX1I4CRWHeglQLnwemEhaw9uRUr2C+LB4EEhJKrabIiyP5ss5R6QMvVDzVXeGkbCYj4LBhfp0ApjNgCP+CqQLmhKrQd/b+SGI= Received: by 10.70.73.13 with SMTP id v13mr3999069wxa; Fri, 09 Jun 2006 15:48:33 -0700 (PDT) Received: by 10.70.75.9 with HTTP; Fri, 9 Jun 2006 15:48:33 -0700 (PDT) Message-ID: <1d219a6f0606091548m7213bdccifd8f556e4f2256be@mail.gmail.com> Date: Fri, 9 Jun 2006 18:48:33 -0400 From: "Chris Hoover" To: "Tom Lane" Subject: Re: Major Problems with PostgreSQL Logs (8.1.3) Cc: "pgsql-admin@postgresql.org" In-Reply-To: <24760.1149886897@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_39127_21233319.1149893313710" References: <1d219a6f0606091027w554c5b66o38b2ecce5d2ec8f6@mail.gmail.com> <24760.1149886897@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/87 X-Sequence-Number: 22049 ------=_Part_39127_21233319.1149893313710 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Is there an easy way to see if this is the problem? How can I verify the size of PIPEBUF, and additionally, how do you tell the exact size of the statement being logged? On 6/9/06, Tom Lane wrote: > > "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 > ------=_Part_39127_21233319.1149893313710 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Is there an easy way to see if this is the problem?  How can I verify the size of PIPEBUF, and additionally, how do you tell the exact size of the statement being logged?

On 6/9/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Chris Hoover" < revoohc@gmail.com> 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

------=_Part_39127_21233319.1149893313710--