Re: synchronous_commit off

From: Greg Smith <greg(at)2ndQuadrant(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: synchronous_commit off
Date: 2011-08-01 19:52:45
Message-ID: 4E37040D.8000000@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 08/01/2011 09:29 AM, Anibal David Acosta wrote:
>
> Can a transaction committed asynchronously report an error, duplicate
> key or something like that, causing a client with a OK transaction but
> server with a FAILED transaction.
>
>

No. You are turning off the wait for the transaction to hit disk before
returning to the client, but all the validation checks are done before
that. The sole risk with synchronous_commit off is that a client will
get COMMIT, but the server will lose the transaction completely--when
there's a crash before it's written to disk.

--
Greg Smith 2ndQuadrant US greg(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Anibal David Acosta 2011-08-01 20:05:39 Re: synchronous_commit off
Previous Message Kevin Grittner 2011-08-01 14:47:16 Re: insert