Re: synchronous_commit=off doesn't always return immediately

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: tomrevam <tomer(at)fabrix(dot)tv>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: synchronous_commit=off doesn't always return immediately
Date: 2009-07-27 01:56:31
Message-ID: 20090727015631.GB10327@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

tomrevam wrote:

> The behavior of the system is the same with bg_writer_lru_maxpages =
> 0. Can you explain why transactions are sometimes synchronous even
> with the synchrounous_commit set to off?

Asynchronous transactions must still be logged to the journal from time
to time. There's a background process called the "wal writer" that's
supposed to do that on the background, but if you have too much WAL
traffic then some transactions may block if there's not enough space in
the in-memory WAL buffer to store their changes, which causes them to
block. This is why Tom was suggesting you to increase wal_buffers. Did
you try that?

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2009-07-27 02:13:15 Re: comparing NEW and OLD (any good this way?)
Previous Message Tom Lane 2009-07-27 00:30:55 Re: Ruuning two instances of Postgres on the same machine