Received: from mail.libertyrms.com (unknown [216.94.172.167]) by postgresql.org (Postfix) with ESMTP id 39F2947514F for ; Tue, 30 Jul 2002 10:59:57 -0400 (EDT) Received: from andrew by mail.libertyrms.com with local (Exim 3.22 #3 (Debian)) id 17ZYTi-0002Kv-00 for ; Tue, 30 Jul 2002 11:00:02 -0400 Date: Tue, 30 Jul 2002 11:00:02 -0400 From: Andrew Sullivan To: pgsql-general@postgresql.org Subject: Re: log sql? Message-ID: <20020730110002.G5295@mail.libertyrms.com> Mail-Followup-To: Andrew Sullivan , pgsql-general@postgresql.org References: <20020729084413.A8252@mail.libertyrms.com> <200207300414.g6U4EGI29236@candle.pha.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200207300414.g6U4EGI29236@candle.pha.pa.us>; from pgman@candle.pha.pa.us on Tue, Jul 30, 2002 at 12:14:16AM -0400 X-Archive-Number: 200207/1802 X-Sequence-Number: 28288 On Tue, Jul 30, 2002 at 12:14:16AM -0400, Bruce Momjian wrote: > Andrew, what postgresql.conf parameter is query logging. I don't see > it. I see: > > #log_connections = false > #log_timestamp = false > #log_pid = false debug_print_query = true If you really want to see what's going on, you can also turn on any of these: #debug_print_parse = false #debug_print_rewritten = false #debug_print_plan = false #debug_pretty_print = false The _rewritten one is really interesting, and sometimes shows you why your query runs slowly. Not recommended for production systems, though! Note that all of this exacts a cost, so if you need really blazing performance, it's not a bad idea to turn it off. But for tracking down problems, nothing beats a good verbose log. A -- ---- Andrew Sullivan 87 Mowat Avenue Liberty RMS Toronto, Ontario Canada M6K 3E3 +1 416 646 3304 x110