Received: from candle.pha.pa.us (216-55-132-35.dsl.san-diego.abac.net [216.55.132.35]) by postgresql.org (Postfix) with ESMTP id 5CBBD47545D for ; Tue, 30 Jul 2002 11:06:53 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g6UF6sS25229; Tue, 30 Jul 2002 11:06:54 -0400 (EDT) From: Bruce Momjian Message-Id: <200207301506.g6UF6sS25229@candle.pha.pa.us> Subject: Re: log sql? In-Reply-To: <20020730110002.G5295@mail.libertyrms.com> To: Andrew Sullivan Date: Tue, 30 Jul 2002 11:06:54 -0400 (EDT) Cc: pgsql-general@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200207/1803 X-Sequence-Number: 28289 What we really need is something that prints the query, username, and times for admins who want to see which queries are slow. That is on the TODO list. --------------------------------------------------------------------------- Andrew Sullivan wrote: > 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 > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026