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

From Tom Lane
Subject Re: log_duration is redundant, no?
Date
Msg-id 489.1157669910@sss.pgh.pa.us
Whole thread Raw
In response to Re: log_duration is redundant, no?  (Bruce Momjian <bruce@momjian.us>)
Responses Re: log_duration is redundant, no?  (Bruce Momjian <bruce@momjian.us>)
Re: log_duration is redundant, no?  ("Guillaume Smet" <guillaume.smet@gmail.com>)
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> Well, except for bind, all the log output display is zero cost, just a
> printf(), as I remember.  The only cost that is significant, I think, is
> the timing of the query, and that is happening for all the setttings
> discussed.

On a machine with slow gettimeofday(), measuring duration at all is
going to hurt, but apparently that is not Guillaume's situation ---
what's costing him is sheer log volume.  And remember that the
slow-gettimeofday problem exists mainly on cheap PCs, not server-grade
hardware.  Based on his experience I'm prepared to believe that there
is a use-case for logging just the duration for short queries.

It seems like we should either remove the separate log_duration boolean
or make it work as he suggests.  I'm leaning to the second answer now.
What's your vote?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Chris Browne
Date:
Subject: Re: New Linux Filesystem: NILFS
Next
From: elein
Date:
Subject: Domains and subtypes, a brief proposal