Re: Full statement logging problematic on larger machines?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>
Cc: Frank Joerdens <frank(at)joerdens(dot)de>, pgsql-performance(at)postgresql(dot)org, Nic Ferrier <nic(at)woome(dot)com>, Avleen Vig <avleen(at)woome(dot)com>, Mike Rogers <mike(dot)rogers(at)woome(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: Full statement logging problematic on larger machines?
Date: 2009-03-12 01:45:51
Message-ID: 29255.1236822351@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com> 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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Carey 2009-03-12 02:01:57 Re: Proposal of tunable fix for scalability of 8.4
Previous Message Tom Lane 2009-03-12 01:32:36 Re: Proposal of tunable fix for scalability of 8.4