Re: log_duration is redundant, no? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: log_duration is redundant, no?
Date
Msg-id 7026.1158359409@sss.pgh.pa.us
Whole thread Raw
In response to Re: log_duration is redundant, no?  ("Guillaume Smet" <guillaume.smet@gmail.com>)
Responses Re: log_duration is redundant, no?  ("Guillaume Smet" <guillaume.smet@gmail.com>)
List pgsql-hackers
"Guillaume Smet" <guillaume.smet@gmail.com> writes:
> Is it normal that when I set log_duration to on and log_statement to
> all, I have the following output when I prepare/bind/execute a
> prepared statement using the protocol:
> LOG:  duration: 0.250 ms
> LOG:  duration: 0.057 ms
> LOG:  execute my_query: SELECT * FROM shop WHERE $1 = $2
> DETAIL:  parameters: $1 = 'Clothes Clothes Clothes', $2 = 'Joe''s Widgets'

> I suppose the first line is the prepare and the second line is the
> bind but I'm not sure it's the desired behaviour.

Well, considering that the parse and bind may take longer than the
execute, I hardly think we want to ignore them for log_duration
purposes.  And we agreed that if log_duration is on and
log_min_duration_statement is not triggered, log_duration should print
*only* duration.  So I'm not sure what else you expected.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Guillaume Smet"
Date:
Subject: Re: log_duration is redundant, no?
Next
From: Alvaro Herrera
Date:
Subject: Re: question regarding regression tests