pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
logging queries
4+ messages / 3 participants
[nested] [flat]

* logging queries
@ 2002-09-23 22:05 Nick Fankhauser <nickf@ontko.com>
  2002-09-24 00:25 ` Re: logging queries Phil Geer <philg@gearcc.com>
  2002-09-24 07:35 ` Re: logging queries Gaetano Mendola <mendola@bigfoot.com>
  0 siblings, 2 replies; 4+ messages in thread

From: Nick Fankhauser @ 2002-09-23 22:05 UTC (permalink / raw)
  To: pgsql-admin

Hi-

I'd like to set the logging or debug level so that the text of the queries
that are executed show up in the log file. It seems to me that I recall this
being discussed before, but I can't find any specific references in the
runtime-config portion of the docs.

Can someone tell me if this is possible & if so, what runtime settings are
needed?

Thanks

-Nick

--------------------------------------------------------------------------
Nick Fankhauser  nickf@ontko.com  Phone 1.765.935.4283  Fax 1.765.962.9788
Ray Ontko & Co.     Software Consulting Services     http://www.ontko.com/




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: logging queries
  2002-09-23 22:05 logging queries Nick Fankhauser <nickf@ontko.com>
@ 2002-09-24 00:25 ` Phil Geer <philg@gearcc.com>
  2002-09-25 12:52   ` Re: logging queries Nick Fankhauser <nickf@ontko.com>
  1 sibling, 1 reply; 4+ messages in thread

From: Phil Geer @ 2002-09-24 00:25 UTC (permalink / raw)
  To: nickf@ontko.com; pgsql-admin

Here is a link to the doc you need.

http://www.postgresql.org/idocs/index.php?runtime-config.html#LOGGING

DEBUG_PRINT_QUERY (boolean)
DEBUG_PRINT_PARSE (boolean)
DEBUG_PRINT_REWRITTEN (boolean)
DEBUG_PRINT_PLAN (boolean)
DEBUG_PRETTY_PRINT (boolean)

Hope this helps
Phil
----- Original Message -----
From: "Nick Fankhauser" <nickf@ontko.com>
To: "pgsql-admin" <pgsql-admin@postgresql.org>
Sent: Monday, September 23, 2002 6:05 PM
Subject: [ADMIN] logging queries


> Hi-
>
> I'd like to set the logging or debug level so that the text of the queries
> that are executed show up in the log file. It seems to me that I recall
this
> being discussed before, but I can't find any specific references in the
> runtime-config portion of the docs.
>
> Can someone tell me if this is possible & if so, what runtime settings are
> needed?
>
> Thanks
>
> -Nick
>
> --------------------------------------------------------------------------
> Nick Fankhauser  nickf@ontko.com  Phone 1.765.935.4283  Fax 1.765.962.9788
> Ray Ontko & Co.     Software Consulting Services     http://www.ontko.com/
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: logging queries
  2002-09-23 22:05 logging queries Nick Fankhauser <nickf@ontko.com>
  2002-09-24 00:25 ` Re: logging queries Phil Geer <philg@gearcc.com>
@ 2002-09-25 12:52   ` Nick Fankhauser <nickf@ontko.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Nick Fankhauser @ 2002-09-25 12:52 UTC (permalink / raw)
  To: Phil Geer <philg@gearcc.com>; pgsql-admin

Thanks Phil- That was exactly what I needed.

A couple of notes that might help others-

My goal was to get all of the SQL statements from a JDBC front-end to be
logged as they are executed in the postgres.log file (and not in the
syslog.) Adding the following to my postgresql.conf did the job:

syslog = 0
silent_mode = off
debug_print_query = on
debug_pretty_print = on

I'm not sure if the pretty print option does anything for the SQL, but it
didn't hurt.

-Nick


> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org
> [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Phil Geer
> Sent: Monday, September 23, 2002 7:25 PM
> To: nickf@ontko.com; pgsql-admin
> Subject: Re: [ADMIN] logging queries
>
>
> Here is a link to the doc you need.
>
> http://www.postgresql.org/idocs/index.php?runtime-config.html#LOGGING
>
> DEBUG_PRINT_QUERY (boolean)
> DEBUG_PRINT_PARSE (boolean)
> DEBUG_PRINT_REWRITTEN (boolean)
> DEBUG_PRINT_PLAN (boolean)
> DEBUG_PRETTY_PRINT (boolean)
>
> Hope this helps
> Phil
> ----- Original Message -----
> From: "Nick Fankhauser" <nickf@ontko.com>
> To: "pgsql-admin" <pgsql-admin@postgresql.org>
> Sent: Monday, September 23, 2002 6:05 PM
> Subject: [ADMIN] logging queries
>
>
> > Hi-
> >
> > I'd like to set the logging or debug level so that the text of
> the queries
> > that are executed show up in the log file. It seems to me that I recall
> this
> > being discussed before, but I can't find any specific references in the
> > runtime-config portion of the docs.
> >
> > Can someone tell me if this is possible & if so, what runtime
> settings are
> > needed?
> >
> > Thanks
> >
> > -Nick
> >
> >
> --------------------------------------------------------------------------
> > Nick Fankhauser  nickf@ontko.com  Phone 1.765.935.4283  Fax
> 1.765.962.9788
> > Ray Ontko & Co.     Software Consulting Services
http://www.ontko.com/
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: logging queries
  2002-09-23 22:05 logging queries Nick Fankhauser <nickf@ontko.com>
@ 2002-09-24 07:35 ` Gaetano Mendola <mendola@bigfoot.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Gaetano Mendola @ 2002-09-24 07:35 UTC (permalink / raw)
  To: pgsql-admin


""Nick Fankhauser"" <nickf@ontko.com> wrote in message
news:NEBBLAAHGLEEPCGOBHDGOEHAFNAA.nickf@ontko.com...
> Hi-
>
> I'd like to set the logging or debug level so that the text of the queries
> that are executed show up in the log file. It seems to me that I recall
this
> being discussed before, but I can't find any specific references in the
> runtime-config portion of the docs.
>
> Can someone tell me if this is possible & if so, what runtime settings are
> needed?

Well,
in    postgresql.conf     put
debug_level = 2
debug_print_query = true


Ciao
Gaetano





^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2002-09-25 12:52 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-09-23 22:05 logging queries Nick Fankhauser <nickf@ontko.com>
2002-09-24 00:25 ` Phil Geer <philg@gearcc.com>
2002-09-25 12:52   ` Nick Fankhauser <nickf@ontko.com>
2002-09-24 07:35 ` Gaetano Mendola <mendola@bigfoot.com>

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