Re: Logging statement/duration on the same line - Mailing list pgsql-general

From Tom Lane
Subject Re: Logging statement/duration on the same line
Date
Msg-id 18540.1265825705@sss.pgh.pa.us
Whole thread Raw
In response to Logging statement/duration on the same line  (Baron Schwartz <baron@xaprb.com>)
Responses Re: Logging statement/duration on the same line  (Baron Schwartz <baron@xaprb.com>)
List pgsql-general
Baron Schwartz <baron@xaprb.com> writes:
> I'm writing a log parser front-end.  I've seen some log samples that
> look like this, with the duration and statement on the same line:

> LOG:  duration: 1.565 ms  statement: SELECT * FROM users WHERE user_id='692'

> But in my 8.3.9 test installation, durations are always logged on a
> separate line.  Is the sample above from a different version?  Or is
> there a way to get this output with different configuration?

If the statement text was already printed due to log_statement,
duration logging doesn't repeat it.  So if you prefer that type of
display, turn off log_statement and instead set
log_min_duration_statement = 0 to log everything via duration logging.

            regards, tom lane

pgsql-general by date:

Previous
From: hubert depesz lubaczewski
Date:
Subject: Re: Logging statement/duration on the same line
Next
From: Jeff Ross
Date:
Subject: Re: Memory Usage and OpenBSD