Wow, that is strange.  If you don't use syslog, do you see the proper
output?  If you turn on log_statement, do you see the statements?

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

Ryszard Lach wrote:
> On Mon, Nov 17, 2003 at 09:37:07PM -0500, Bruce Momjian wrote:
> > Ryszard Lach wrote:
> > > 
> > > Hi.
> > > 
> > > I'm trying to set run-time environment in pgsql7.4 so, that it prints
> > > all statements with duration time, but I can't understand why setting
> > > log_min_duration_statement to '0' causes printing to syslog plenty of
> > > lines ending with 'duration: statement:', i.e. without any statement
> > > string (except expected ones). Can anybody help me?
> > 
> > Can you show us some of the log file?  If I do:
> >     
> 
> Sure.
> 
> Nov 18 10:05:20  postgres[1348]: [318-1] LOG:  duration: 0.297 ms  statement:
> Nov 18 10:05:20  postgres[1311]: [5477-1] LOG:  duration: 0.617 ms  statement:
> Nov 18 10:05:20  postgres[1312]: [5134-1] LOG:  duration: 0.477 ms  statement:
> Nov 18 10:05:20  postgres[1349]: [318-1] LOG:  duration: 0.215 ms  statement:
> Nov 18 10:05:20  postgres[1313]: [5449-1] LOG:  duration: 0.512 ms  statement:
> Nov 18 10:05:20  postgres[1314]: [5534-1] LOG:  duration: 0.420 ms  statement:
> Nov 18 10:05:20  postgres[1330]: [772-1] LOG:  duration: 1.386 ms  statement: SELECT 
> * FROM mytablemius WHERE id = 0;
> Nov 18 10:05:20  postgres[1315]: [5757-1] LOG:  duration: 0.417 ms  statement:
> Nov 18 10:05:20  postgres[1316]: [5885-1] LOG:  duration: 0.315 ms  statement:
> Nov 18 10:05:20  postgres[1317]: [5914-1] LOG:  duration: 0.301 ms  statement:
> Nov 18 10:05:20  postgres[1318]: [5990-1] LOG:  duration: 0.293 ms  statement:
> Nov 18 10:05:20  postgres[1319]: [6009-1] LOG:  duration: 0.211 ms  statement:
> Nov 18 10:05:20  postgres[1320]: [6039-1] LOG:  duration: 0.188 ms  statement:
> 
> 
> this is with setting
> 
> log_duration = false
> log_statement = false
> log_min_duration_statement = 0
> 
> The amount of lines containing statement string is nearly the same ase before
> upgrade (from 7.3), all other lines are extra.
> 
> I don't know if this can be a reason, this is on a pretty busy machine (ca. 100
> selects/second, but loadavg lower then 0.9), I'm logging postgres through syslog.
> 
> Richard.
> 
> -- 
> "First they ignore you. Then they laugh at you. Then they
> fight you. Then you win." - Mohandas Gandhi.
> 

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

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to