Skip site navigation (1) Skip section navigation (2)

Re: log_min_duration_statement versus log_statement

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: josh(at)agliodbs(dot)com
Cc: Christian Robottom Reis <kiko(at)async(dot)com(dot)br>,pgsql-docs(at)postgresql(dot)org, Guilherme Salgado <salgado(at)async(dot)com(dot)br>
Subject: Re: log_min_duration_statement versus log_statement
Date: 2005-07-01 13:32:13
Message-ID: 200507011332.j61DWDn26481@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-docs
Josh Berkus wrote:
> Bruce,
> 
> > OK, what if we change the documentaiton to be:
> >
> > 	log_min_duration_statement = 1000 # Log all statements whose
> > 	                 # execution time exceeds the value, in
> > 	                 # milliseconds.  -1 disables. Zero logs
> > 	                 # all statements and their durations.
> >
> > I think you are confused because log_min_duration_statement is really
> > about _when_ to log (duration > ? ms), and what to log (the statement).
> 
> No, I see what Christian is complaining about.   If one sets 
> log_statement="All", then all statements will be logged regardless of 
> duration or the setting in log_min_duration_statement.  So it should 
> actually read:
> 
>  	log_min_duration_statement = 1000 # Log all statements whose
>  	                 # execution time exceeds the value, in
>  	                 # milliseconds.  -1 disables. This is in addition to
>                          # any statements logged according to 
> log_statement.
> 
> I'm with Christian on wanting to change the behavior so that it does what 
> the comments says it does currently, but I don't think we'll get that done 
> today.

I have updated the documentation to be clearer that this is a complex
setting.  The old docs were not very clear on this point.

Attached and applied.

I don't know we can ever combine this with log_statement and
log_duration because log_statement prints when the statement starts, not
when it completes.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-docs by date

Next:From: Halley Pacheco de OliveiraDate: 2005-07-05 11:14:40
Subject: current_schemas()
Previous:From: Bruce MomjianDate: 2005-07-01 13:24:47
Subject: Problem with on/off, true/false in postgresql.conf

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group