Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 428739FB694 for ; Fri, 11 May 2007 08:41:49 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 16454-01 for ; Fri, 11 May 2007 08:41:39 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.233]) by postgresql.org (Postfix) with ESMTP id 63B3B9FB578 for ; Fri, 11 May 2007 08:41:43 -0300 (ADT) Received: by wx-out-0506.google.com with SMTP id i28so804479wxd for ; Fri, 11 May 2007 04:41:42 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=byrO4Wk26GFHIVu+XNh/2+jC3PNs9JypziXtnIv1X5kCgd0HNSopxIx5+3jMjEJdUCsLhQCJRHXD9jLS0wdQcZY4h+KLwKJocCwKV581Wve3Qgo7OCSRP6uGIv0tMPPEIWPx01t+eQOsYFTUpULTq0hIG7tRzctlvOqcEgswrZ4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=kmKmjcRZbw/foXgjgEtCK5CFZ13mDsHC0NFuUY5Y5IYlfCGZvs1qHeKt/yY/Y01lx1sx3q6tHO9sA4XdRTa9QxLoRrhCdFHtzwnDYG43ZzV2smeTpPqP6lqpdCVID71zDwkyBjVyIo8SCjaR5ibE0h736YWIz0KDJN8Rbj65YQ8= Received: by 10.78.123.5 with SMTP id v5mr774858huc.1178883700990; Fri, 11 May 2007 04:41:40 -0700 (PDT) Received: from ?192.168.1.33? ( [82.3.68.110]) by mx.google.com with ESMTP id 20sm5900568uga.2007.05.11.04.41.38; Fri, 11 May 2007 04:41:38 -0700 (PDT) Message-ID: <46445670.9020209@enterprisedb.com> Date: Fri, 11 May 2007 12:41:36 +0100 From: Heikki Linnakangas User-Agent: Icedove 1.5.0.10 (X11/20070329) MIME-Version: 1.0 To: Guillaume Smet CC: Greg Smith , pgsql-patches@postgresql.org Subject: Re: Logging checkpoints and other slowdown causes References: <200704030814.33999.peter_e@gmx.net> <46443F02.6060300@enterprisedb.com> <1d4e0c10705110429n3e7f1f9as8eab7fcbeb610758@mail.gmail.com> In-Reply-To: <1d4e0c10705110429n3e7f1f9as8eab7fcbeb610758@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/110 X-Sequence-Number: 2210 Guillaume Smet wrote: > On 5/11/07, Heikki Linnakangas wrote: >> I agree that debug levels are not suitable for this. > > Squid (the (reverse) proxy) has a nice feature for debugging purposes > (admin and developers). It's possible to have different logging level > for different sections of the code. For example, if you want to debug > a particular part, you can have ALL,1 33,2 in your config file which > allows you to have a more verbose debug on the section 33 of the code > (33 is ACL). > It's really useful because you can even debug a particular code path > or a misconfiguration in production without generating a huge amount > of logs. Yes, that'd be really nice, though using numeric codes is a bit archaic. In Java-world, a logging framework called log4j has become the de facto standard to implement logging. It's basically the same idea, you have different log levels, and you can have enable different levels of logging for different modules. I'm sure there's similar libraries for C, that's something to think about in future releases. 8.3 will add some new log_* GUC variables, log_autovacuum and log_temp_files, so it seems we're headed to that direction already. I'm now thinking that's the approach we should take for checkpoints as well: add a new GUC variable, log_checkpoints, and print the messages at LOG-level if that's enabled. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com