Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 7EC1E6500B8 for ; Tue, 8 Jul 2008 11:35:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 19843-09 for ; Tue, 8 Jul 2008 11:35:19 -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 postgresql.org (Postfix) with ESMTP id 9A15264FFDC for ; Tue, 8 Jul 2008 11:35:25 -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 m68EZGaa008676; Tue, 8 Jul 2008 10:35:16 -0400 (EDT) To: Achilleas Mantzios cc: pgsql-performance@postgresql.org Subject: Re: syslog performance when logging big statements In-reply-to: <200807081524.47366.achill@matrix.gatewaynet.com> References: <200807081524.47366.achill@matrix.gatewaynet.com> Comments: In-reply-to Achilleas Mantzios message dated "Tue, 08 Jul 2008 15:24:46 +0300" Date: Tue, 08 Jul 2008 10:35:16 -0400 Message-ID: <8675.1215527716@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/69 X-Sequence-Number: 30669 Achilleas Mantzios writes: > In this case, the INSERT *needs* 20 minutes to return. This is because the logging through syslog seems to severely slow the system. > If instead, i use stderr, even with logging_collector=on, the same statement needs 15 seconds to return. Hmm. There's a function in elog.c that breaks log messages into chunks for syslog. I don't think anyone's ever looked hard at its performance --- maybe there's an O(N^2) behavior? regards, tom lane