pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Andrew Sullivan <andrew@libertyrms.info>
Cc: pgsql-general@postgresql.org
Subject: Re: log sql?
Date: Tue, 30 Jul 2002 11:06:54 -0400 (EDT)
Message-ID: <200207301506.g6UF6sS25229@candle.pha.pa.us> (raw)
In-Reply-To: <20020730110002.G5295@mail.libertyrms.com>


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
> <andrew@libertyrms.info>                              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



view thread (14+ messages)  latest in thread

Message-ID: <200207301506.g6UF6sS25229@candle.pha.pa.us>
Permalink:  ../200207301506.g6UF6sS25229@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200207301506.g6UF6sS25229@candle.pha.pa.us

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: pgman@candle.pha.pa.us, andrew@libertyrms.info, pgsql-general@postgresql.org
  Subject: Re: log sql?
  In-Reply-To: <200207301506.g6UF6sS25229@candle.pha.pa.us>
  References: <20020730110002.G5295@mail.libertyrms.com> <200207301506.g6UF6sS25229@candle.pha.pa.us>

* 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