pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Smith <greg@2ndQuadrant.com>
To: pgsql-performance@postgresql.org
Subject: Re: synchronous_commit off
Date: Mon, 01 Aug 2011 15:52:45 -0400
Message-ID: <4E37040D.8000000@2ndQuadrant.com> (raw)
In-Reply-To: <001201cc504f$11f32e50$35d98af0$@devshock.com>
References: <001201cc504f$11f32e50$35d98af0$@devshock.com>

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@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us

view thread (5+ messages)  latest in thread

Message-ID: <4E37040D.8000000@2ndQuadrant.com>
Permalink:  ../4E37040D.8000000@2ndQuadrant.com/
Also on:    postgresql.org/message-id/4E37040D.8000000@2ndQuadrant.com

 · 

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: greg@2ndQuadrant.com
  Subject: Re: synchronous_commit off
  In-Reply-To: <4E37040D.8000000@2ndQuadrant.com>

* 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