Re: Expensive log_line_prefix ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>
Cc: "Sahagian, David" <david(dot)sahagian(at)emc(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Expensive log_line_prefix ?
Date: 2012-10-11 22:18:00
Message-ID: 1312.1349993880@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sergey Konoplev <gray(dot)ru(at)gmail(dot)com> writes:
> On Thu, Oct 11, 2012 at 12:19 PM, Sahagian, David
> <david(dot)sahagian(at)emc(dot)com> wrote:
>> Are there any "extra" costs to logging all this cool stuff ?
>>
>> log_line_prefix = '%m %a %u %p %c %m %v %x'

> The formatting cost only but it is so insignificant that does not
> worth bothering with it.

IIRC, %m would imply a gettimeofday call, which might be expensive
depending on your OS and hardware. I think all the other info is
"just sitting around", though.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thalis Kalfigkopoulos 2012-10-11 22:39:18 AS s(a) vs. AS a
Previous Message Sergey Konoplev 2012-10-11 22:14:30 Re: How to raise index points when equal and like is used with gist ?