Re: [HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-27 Thread David Rowley
On Fri, Sep 27, 2013 at 10:28 AM, Robert Haas robertmh...@gmail.com wrote: On Thu, Sep 26, 2013 at 5:18 PM, Robert Haas robertmh...@gmail.com wrote: On Thu, Sep 26, 2013 at 3:55 PM, David Rowley dgrowle...@gmail.com wrote: I think I must have forgot to save it before I emailed it...

Re: [HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-26 Thread Robert Haas
On Wed, Sep 25, 2013 at 4:46 AM, David Rowley dgrowle...@gmail.com wrote: Ok, I think I've managed to narrow the performance gap to just about nothing but noise, though to do this the code is now a bit bigger. I've added a series of tests to see if the padding is 0 and if it's not then I'm

Re: [HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-26 Thread David Rowley
On Fri, Sep 27, 2013 at 4:44 AM, Robert Haas robertmh...@gmail.com wrote: On Wed, Sep 25, 2013 at 4:46 AM, David Rowley dgrowle...@gmail.com wrote: Ok, I think I've managed to narrow the performance gap to just about nothing but noise, though to do this the code is now a bit bigger. I've

Re: [HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-26 Thread Robert Haas
On Thu, Sep 26, 2013 at 3:55 PM, David Rowley dgrowle...@gmail.com wrote: I think I must have forgot to save it before I emailed it... Here's the correct version. Ah ha. Looks better. I'm working on getting this committed now. Aside from some stylistic things, I've found one serious

Re: [HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-26 Thread Robert Haas
On Thu, Sep 26, 2013 at 5:18 PM, Robert Haas robertmh...@gmail.com wrote: On Thu, Sep 26, 2013 at 3:55 PM, David Rowley dgrowle...@gmail.com wrote: I think I must have forgot to save it before I emailed it... Here's the correct version. Ah ha. Looks better. I'm working on getting this

Re: [HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-25 Thread David Rowley
On Wed, Sep 25, 2013 at 1:20 AM, Robert Haas robertmh...@gmail.com wrote: On Tue, Sep 24, 2013 at 5:04 AM, David Rowley dgrowle...@gmail.com wrote: So... I guess the question that I'd ask is, if you write a PL/pgsql function that does RAISE NOTICE in a loop a large number of times, can

Re: [HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-25 Thread Peter Eisentraut
On 9/25/13 4:46 AM, David Rowley wrote: Please find attached the new patch ... version v0.5 and also updated benchmark results. Please fix compiler warnings: elog.c: In function ‘log_line_prefix.isra.3’: elog.c:2436:22: warning: ‘padding’ may be used uninitialized in this function

Re: [HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-25 Thread David Rowley
On Thu, Sep 26, 2013 at 4:57 AM, Peter Eisentraut pete...@gmx.net wrote: On 9/25/13 4:46 AM, David Rowley wrote: Please find attached the new patch ... version v0.5 and also updated benchmark results. Please fix compiler warnings: elog.c: In function ‘log_line_prefix.isra.3’:

Re: [HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-24 Thread David Rowley
On Tue, Sep 24, 2013 at 5:16 AM, Robert Haas robertmh...@gmail.com wrote: On Fri, Sep 20, 2013 at 11:28 PM, David Rowley dgrowle...@gmail.com wrote:\ I put the above results into the attached spreadsheet. On my intel i5 laptop I'm seeing a slow down of about 1 second per million queries

Re: [HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-24 Thread Robert Haas
On Tue, Sep 24, 2013 at 5:04 AM, David Rowley dgrowle...@gmail.com wrote: So... I guess the question that I'd ask is, if you write a PL/pgsql function that does RAISE NOTICE in a loop a large number of times, can you measure any difference in how fast that function executes on the patch and

Re: [HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-24 Thread Alvaro Herrera
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

Re: [HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-24 Thread Andres Freund
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

Re: [HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-24 Thread Andres Freund
On 2013-09-24 19:56:32 +0200, Andres Freund wrote: 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

Re: [HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-24 Thread David Rowley
On Wed, Sep 25, 2013 at 6:25 AM, Andres Freund and...@2ndquadrant.comwrote: On 2013-09-24 19:56:32 +0200, Andres Freund wrote: 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

Re: [HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-23 Thread Robert Haas
On Fri, Sep 20, 2013 at 11:28 PM, David Rowley dgrowle...@gmail.com wrote:\ I put the above results into the attached spreadsheet. On my intel i5 laptop I'm seeing a slow down of about 1 second per million queries for the longer log_line_prefix and about 1 second per 5 million queries with the

Re: [HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-20 Thread David Rowley
On Fri, Sep 20, 2013 at 12:48 AM, Peter Eisentraut pete...@gmx.net wrote: Something is weird in your latest patch. The header is: diff -u -r b/postgresql/doc/src/sgml/config.sgml a/postgresql/doc/src/sgml/config.sgml --- b/postgresql/doc/src/sgml/config.sgml 2013-09-09

Re: [HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-20 Thread Albe Laurenz
David Rowley wrote: I moved the source around and I've patched against it again. New patch attached. Thank you, marked as ready for committer. Yours, Laurenz Albe -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-20 Thread Robert Haas
On Fri, Sep 20, 2013 at 3:15 AM, Albe Laurenz laurenz.a...@wien.gv.at wrote: David Rowley wrote: I moved the source around and I've patched against it again. New patch attached. Thank you, marked as ready for committer. /* + * helper function for processing the format string in + *

Re: [HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-20 Thread David Rowley
On Sat, Sep 21, 2013 at 7:18 AM, Robert Haas robertmh...@gmail.com wrote: On Fri, Sep 20, 2013 at 3:15 AM, Albe Laurenz laurenz.a...@wien.gv.at wrote: David Rowley wrote: I moved the source around and I've patched against it again. New patch attached. Thank you, marked as ready for

[HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-19 Thread David Rowley
(Forgot to copy list) From: David Rowley [mailto:dgrowle...@gmail.com] Sent: 19 September 2013 22:35 To: Albe Laurenz Subject: Re: REVIEW: Allow formatting in log_line_prefix Hi Laurenz, Thanks for the review. Please see my comments below and the updated patch attached. On Thu, Sep

Re: [HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-19 Thread Peter Eisentraut
Something is weird in your latest patch. The header is: diff -u -r b/postgresql/doc/src/sgml/config.sgml a/postgresql/doc/src/sgml/config.sgml --- b/postgresql/doc/src/sgml/config.sgml 2013-09-09 23:40:52.356371191 +1200 +++ a/postgresql/doc/src/sgml/config.sgml 2013-09-19