Re: FW: REVIEW: Allow formatting in log_line_prefix - Mailing list pgsql-hackers

From Andres Freund
Subject Re: FW: REVIEW: Allow formatting in log_line_prefix
Date
Msg-id 20130924175632.GB11521@awork2.anarazel.de
Whole thread Raw
In response to Re: FW: REVIEW: Allow formatting in log_line_prefix  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: FW: REVIEW: Allow formatting in log_line_prefix  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
On 2013-09-24 13:51:04 -0300, Alvaro Herrera wrote:
> David Rowley escribió:
>
> > I do see a 15-18% slow down with the patched version, so perhaps I'll need
> > to look to see if I can speed it up a bit, although I do feel this
> > benchmark is not quite a normal workload.
>
> Ouch.  That's certainly way too much.  Is the compiler inlining
> process_log_prefix_padding()?  If not, does it do it if you add "inline"
> to it?  That might speed up things a bit.  If that's not enough, maybe
> you need some way to return to the original coding for the case where no
> padding is set in front of each option.

From a very short look without actually running it I'd guess the issue
is all the $* things you're now passing to do appendStringInfo (which
passes them off to vsnprintf).
How does it look without that?

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Some interesting news about Linux 3.12 OOM
Next
From: Robert Haas
Date:
Subject: Re: record identical operator