From: Heikki Linnakangas <heikki@enterprisedb.com>
To: Guillaume Smet <guillaume.smet@gmail.com>
Cc: Greg Smith <gsmith@gregsmith.com>
Cc: pgsql-patches@postgresql.org
Subject: Re: Logging checkpoints and other slowdown causes
Date: Fri, 11 May 2007 12:41:36 +0100
Message-ID: <46445670.9020209@enterprisedb.com> (raw)
In-Reply-To: <1d4e0c10705110429n3e7f1f9as8eab7fcbeb610758@mail.gmail.com>
References: <Pine.GSO.4.64.0704010051050.14920@westnet.com>
<200704030814.33999.peter_e@gmx.net>
<Pine.GSO.4.64.0704030927180.5732@westnet.com>
<46443F02.6060300@enterprisedb.com>
<1d4e0c10705110429n3e7f1f9as8eab7fcbeb610758@mail.gmail.com>
Guillaume Smet wrote:
> On 5/11/07, Heikki Linnakangas <heikki@enterprisedb.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: heikki@enterprisedb.com, guillaume.smet@gmail.com, gsmith@gregsmith.com, pgsql-patches@postgresql.org
Subject: Re: Logging checkpoints and other slowdown causes
In-Reply-To: <46445670.9020209@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox