Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 20D6F632B60 for ; Wed, 11 Mar 2009 22:47:16 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 58210-04 for ; Wed, 11 Mar 2009 22:47:06 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id A01CE634332 for ; Wed, 11 Mar 2009 22:47:14 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id n2C1jphn029256; Wed, 11 Mar 2009 21:45:52 -0400 (EDT) To: Guillaume Smet cc: Frank Joerdens , pgsql-performance@postgresql.org, Nic Ferrier , Avleen Vig , Mike Rogers , Andrew Dunstan Subject: Re: Full statement logging problematic on larger machines? In-reply-to: <1d4e0c10903111659x6c96e6cau33ee121ee29a48a@mail.gmail.com> References: <7d10d2df0903111227g2e40e742g5992cba5158dd4d2@mail.gmail.com> <1d4e0c10903111659x6c96e6cau33ee121ee29a48a@mail.gmail.com> Comments: In-reply-to Guillaume Smet message dated "Thu, 12 Mar 2009 00:59:06 +0100" Date: Wed, 11 Mar 2009 21:45:51 -0400 Message-ID: <29255.1236822351@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.022 tagged_above=0 required=5 tests=AWL=0.022 X-Spam-Level: X-Archive-Number: 200903/111 X-Sequence-Number: 33033 Guillaume Smet writes: > I don't know if the logging integrated into PostgreSQL can bufferize > its output. Andrew? It uses fwrite(), and normally sets its output into line-buffered mode. For a high-throughput case like this it seems like using fully buffered mode might be an acceptable tradeoff. You could try changing _IOLBF to _IOFBF near the head of postmaster/syslogger.c and see if that helps. (If it does, we could think about exposing some way of tuning this without modifying the code, but for now you'll have to do that.) regards, tom lane