Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id AA7C29FC204 for ; Thu, 7 Jun 2007 22:32:47 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 75917-02 for ; Thu, 7 Jun 2007 22:32:37 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id DCE829FB8AE for ; Thu, 7 Jun 2007 22:32:43 -0300 (ADT) Received: from perhan.alvh.no-ip.org (201-221-217-243.bk12-dsl.surnet.cl [201.221.217.243]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l581WAgY013218; Thu, 7 Jun 2007 18:32:11 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id C6EDE32A28; Thu, 7 Jun 2007 21:32:01 -0400 (CLT) Date: Thu, 7 Jun 2007 21:32:01 -0400 From: Alvaro Herrera To: Tom Lane Cc: George Pavlov , "Ed L." , pgsql-general@postgresql.org Subject: Re: query log corrupted-looking entries Message-ID: <20070608013201.GD20828@alvh.no-ip.org> 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> <24885.1180736713@sss.pgh.pa.us> <8C5B026B51B6854CBE88121DBF097A86CDDA32@ehost010-33.exch010.intermedia.net> <8C5B026B51B6854CBE88121DBF097A86DEA716@ehost010-33.exch010.intermedia.net> <11458.1181265461@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <11458.1181265461@sss.pgh.pa.us> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV version 0.88.5, clamav-milter version 0.88.5 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Thu, 07 Jun 2007 18:32:24 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/561 X-Sequence-Number: 115384 Tom Lane wrote: > "George Pavlov" writes: > > I tried the patch and it has no effect whatsoever -- even with the > > patch, under the correct load the corrupted entries are coming fast and > > furious (I found a load profile on my app that reproduces these very > > clearly). > > What are the total lengths of the log entries in which you see the > failure? (The "length" here includes all the lines belonging to a > single logical entry, eg, ERROR, DETAIL, HINT.) > > I believe that this shouldn't be happening except in the case in which > the entry-interpolated-into exceeds PIPE_BUF bytes. I'm not entirely > sure what PIPE_BUF is on Linux machines, but IIRC the Posix spec says it > has to be at least 512, and on older Unix kernels it tends to be 8K. 4096, although for some archs it may be bigger (it's the page size). -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.