• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [OT] Postgresql logging problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OT] Postgresql logging problem


  • Subject: Re: [OT] Postgresql logging problem
  • From: Q <email@hidden>
  • Date: Sat, 23 Jun 2007 14:00:47 +1000

This should do what you want:

log_destination = 'stderr'
redirect_stderr = on
log_directory = '/data/pgsql/data/pg_log' <- change to wherever you want the logfiles written
log_min_messages = debug1
log_min_duration_statement = 0


and add this if you want to know when the query ran:

log_line_prefix = '[%t]'

Don't set log_min_duration_statement to 0 on a busy server, it will seriously impact performance. Instead set it to something higher like 3000 and drop it down incrementally if necessary.

On 23/06/2007, at 10:21 AM, Miguel Arroz wrote:

Hi!

I'm trying to turn on the logging of the time it takes to process a query in PostgreSQL. I changed the postgresql.conf file to the following:

---------------------------------

# - When to Log -

client_min_messages = log # Values, in order of decreasing detail:
# debug5, debug4, debug3, debug2, debug1,
# log, notice, warning, error


log_min_messages = info # Values, in order of decreasing detail:
# debug5, debug4, debug3, debug2, debug1,
# info, notice, warning, error, log, fatal,
# panic


#log_error_verbosity = default  # terse, default, or verbose messages

#log_min_error_statement = panic # Values in order of increasing severity:
# debug5, debug4, debug3, debug2, debug1,
# info, notice, warning, error, panic(off)


log_min_duration_statement = 0 # -1 is disabled, in milliseconds.

#silent_mode = false # DO NOT USE without syslog or redirect_stderr

# - What to Log -

#debug_print_parse = false
#debug_print_rewritten = true
#debug_print_plan = false
#debug_pretty_print = false
#log_connections = false
#log_disconnections = false
log_duration = true
#log_line_prefix = '' # e.g. '<%u%%%d> '
# %u=user name %d=database name
# %r=remote host and port
# %p=PID %t=timestamp %i=command tag
# %c=session id %l=session line number
# %s=session start timestamp % x=transaction id
# %q=stop here in non-session processes
# %%='%'
log_statement = 'all' # none, mod, ddl, all
#log_hostname = false


------------------------------------------

The problem is that postgresql is only logging the queries, not the planning stuff or the time it takes to process them... am I doing something obviously wrong?

  Yours

Miguel Arroz

Miguel Arroz
http://www.terminalapp.net
http://www.ipragma.com



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com


This email sent to email@hidden



-- Seeya...Q

Quinton Dolan - email@hidden
Gold Coast, QLD, Australia (GMT+10)
Ph: +61 419 729 806



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >[OT] Postgresql logging problem (From: Miguel Arroz <email@hidden>)

  • Prev by Date: Re: [OT] Postgresql logging problem
  • Next by Date: Re: WOPopUpButton
  • Previous by thread: Re: [OT] Postgresql logging problem
  • Next by thread: Java Client : who is using it ?
  • Index(es):
    • Date
    • Thread