pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Guillaume Smet <guillaume.smet@gmail.com>
Cc: Frank Joerdens <frank@joerdens.de>
Cc: pgsql-performance@postgresql.org, Nic Ferrier <nic@woome.com>
Cc: Avleen Vig <avleen@woome.com>
Cc: Mike Rogers <mike.rogers@woome.com>
Cc: Andrew Dunstan <andrew@dunslane.net>
Subject: Re: Full statement logging problematic on larger machines?
Date: Wed, 11 Mar 2009 21:45:51 -0400
Message-ID: <29255.1236822351@sss.pgh.pa.us> (raw)
In-Reply-To: <1d4e0c10903111659x6c96e6cau33ee121ee29a48a@mail.gmail.com>
References: <7d10d2df0903111227g2e40e742g5992cba5158dd4d2@mail.gmail.com>
	<1d4e0c10903111659x6c96e6cau33ee121ee29a48a@mail.gmail.com>

Guillaume Smet <guillaume.smet@gmail.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



view thread (16+ messages)  latest in thread

Message-ID: <29255.1236822351@sss.pgh.pa.us>
Permalink:  ../29255.1236822351@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29255.1236822351@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, guillaume.smet@gmail.com, frank@joerdens.de, nic@woome.com, avleen@woome.com, mike.rogers@woome.com, andrew@dunslane.net
  Subject: Re: Full statement logging problematic on larger machines?
  In-Reply-To: <29255.1236822351@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox