Re: log sql? - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: log sql?
Date
Msg-id 20020730110002.G5295@mail.libertyrms.com
Whole thread Raw
In response to Re: log sql?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: log sql?  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
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


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: postgres 7.2.1 parse bug
Next
From: Bruce Momjian
Date:
Subject: Re: log sql?