Re: Full statement logging problematic on larger machines?

From: Tom Lane
Subject: Re: Full statement logging problematic on larger machines?
Date: ,
Msg-id: 29255.1236822351@sss.pgh.pa.us
(view: Whole thread, Raw)
In response to: Re: Full statement logging problematic on larger machines?  (Guillaume Smet)
Responses: Re: Full statement logging problematic on larger machines?  (Frank Joerdens)
List: pgsql-performance

Tree view

Full statement logging problematic on larger machines?  (Frank Joerdens, )
 Re: Full statement logging problematic on larger machines?  (Scott Marlowe, )
 Re: Full statement logging problematic on larger machines?  (Tom Lane, )
  Re: Full statement logging problematic on larger machines?  (Frank Joerdens, )
   Re: Full statement logging problematic on larger machines?  (Laurent Laborde, )
    Re: Full statement logging problematic on larger machines?  (sathiya psql, )
     Re: Full statement logging problematic on larger machines?  (Laurent Laborde, )
    Re: Full statement logging problematic on larger machines?  (Frank Joerdens, )
 Re: Full statement logging problematic on larger machines?  (Guillaume Smet, )
  Re: Full statement logging problematic on larger machines?  (Tom Lane, )
   Re: Full statement logging problematic on larger machines?  (Frank Joerdens, )
    Re: Full statement logging problematic on larger machines?  (Dimitri Fontaine, )
    Re: Full statement logging problematic on larger machines?  (Frank Joerdens, )
     Re: Full statement logging problematic on larger machines?  (Frank Joerdens, )
 Re: Full statement logging problematic on larger machines?  (Guillaume Smet, )
 Re: Full statement logging problematic on larger machines?  (Frank Joerdens, )

Guillaume Smet <> writes:
> I don't know if the logging integrated into PostgreSQL can bufferize
> its output. Andrew?

It uses fwrite(), and normally sets its output into line-buffered mode.
For a high-throughput case like this it seems like using fully buffered
mode might be an acceptable tradeoff.  You could try changing _IOLBF
to _IOFBF near the head of postmaster/syslogger.c and see if that helps.
(If it does, we could think about exposing some way of tuning this
without modifying the code, but for now you'll have to do that.)

            regards, tom lane


pgsql-performance by date:

From: "Jignesh K. Shah"
Date:
Subject: Re: Proposal of tunable fix for scalability of 8.4
From: Guillaume Smet
Date:
Subject: Re: Full statement logging problematic on larger machines?