Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 3A863B5DBC6 for ; Tue, 2 Aug 2011 21:08:17 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 52166-05 for ; Wed, 3 Aug 2011 00:08:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from nm12-vm1.bullet.mail.ne1.yahoo.com (nm12-vm1.bullet.mail.ne1.yahoo.com [98.138.91.41]) by mail.postgresql.org (Postfix) with SMTP id D7DDFB5DBC5 for ; Tue, 2 Aug 2011 21:08:09 -0300 (ADT) Received: from [98.138.90.53] by nm12.bullet.mail.ne1.yahoo.com with NNFMP; 03 Aug 2011 00:08:08 -0000 Received: from [98.138.89.244] by tm6.bullet.mail.ne1.yahoo.com with NNFMP; 03 Aug 2011 00:08:08 -0000 Received: from [127.0.0.1] by omp1058.mail.ne1.yahoo.com with NNFMP; 03 Aug 2011 00:08:08 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 927674.69799.bm@omp1058.mail.ne1.yahoo.com Received: (qmail 89739 invoked by uid 60001); 3 Aug 2011 00:08:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1312330088; bh=E7y/P1/1zAHDzjUEeSGU9PydspY64q4gcxsEPx90z9g=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=ICKNdPk/EpiE+1Q68hbOkeOrRJiXccff64m4PqQySK/zViv/ZKLEPWOmLF1yn18LpfXHb486pQiLbe5GAv++ENuup2xzyuO3wu9VBaEnREGR+PmQKz+FPSyK9HYZK4Ofh3tDgeAV6Qr5J3nrnTDbR2efohBeeX5+sUG1wYFbyf8= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=QbdpCazCaFpDWrMiip9rqtlW44VHm8R+WuzmyBvJtD20qjF8CzHwvDYv2OHlccUMdtTj7vVcgcRrJb54yFZiY3/MIzd96IiEGttsLqHF/4/63Yw6f/pAwYSLvXRIvdCI+qGlWbRjIEhdnx9bItot6cr3Gns9GJZ5bamnkcOHEfU=; X-YMail-OSG: aVJaDR8VM1nZO3qfUuy7f3Iw94SkKxK0k0_VznvMEq2Wyl5 4jje54rbykIJTpo5DsigSm6oMnSPvN_JxN0Wtud2.zG6FjnKqkoOKHpiDZZx pneIGKr9nBc5EeEAKLmA8X4YCvCSzsoduOPyvv1WbYaaEh4w4iKr36aAl73. 8gAkbdiGCQG9iLksraEL5hkDxmu6n.GQcI9_Wqv0R1C.vpRpHO93YWDPgtRE p0PnnIW9Nx.c4DPGEWpKpTvLDcsPxypJzVN82W8kfEuXcUybNzQ_SU9.f.5r 9XsyNeUNsi.RcUSXGZcqQOqBjbljHWK9tvVIyFr_4zYukhzUmtwL7ela6x9F M2k6vZ1WXGto68cfSMMSzZTYXWWgzb7pu1GLHBQEy2_RV3lLwcF_ZKA-- Received: from [67.170.234.149] by web121712.mail.ne1.yahoo.com via HTTP; Tue, 02 Aug 2011 17:08:08 PDT X-Mailer: YahooMailWebService/0.8.112.310352 References: <001201cc504f$11f32e50$35d98af0$@devshock.com> Message-ID: <1312330088.11904.YahooMailNeo@web121712.mail.ne1.yahoo.com> Date: Tue, 2 Aug 2011 17:08:08 -0700 (PDT) From: lars hofhansl Reply-To: lars hofhansl Subject: Re: synchronous_commit off To: Anibal David Acosta , "pgsql-performance@postgresql.org" In-Reply-To: <001201cc504f$11f32e50$35d98af0$@devshock.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-212104951-1312330088=:11904" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.704 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.806 X-Spam-Level: X-Archive-Number: 201108/29 X-Sequence-Number: 44476 --0-212104951-1312330088=:11904 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable No: The commit has the same guarantees as a synchronous commit w.r.t. data = consistency. The commit can only fail (as a whole) due to hardware problems= or postgres backend crashes. =0A=0A=0AAnd yes: The client commit returns, = but the server can fail later and not persist the transaction and it will b= e lost (again as a whole).=0A=0AYour application should be able to tolerate= losing the latest committed transactions if you use this.=0A=0AThe differe= nce to fsync=3Doff is that a server crash will leave the database is a cons= istent state with just the latest transactions lost.=0A=0A=0A=0A___________= _____________________=0AFrom: Anibal David Acosta =0ATo: p= gsql-performance@postgresql.org=0ASent: Monday, August 1, 2011 6:29 AM=0ASu= bject: [PERFORM] synchronous_commit off=0A=0A=0ACan a transaction committed= asynchronously report an error, duplicate key or something like that, caus= ing a client with a OK transaction but server with a FAILED transaction.=0A= =A0=0AThanks --0-212104951-1312330088=:11904 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
No: The co= mmit has the same guarantees as a synchronous commit w.r.t. data consistenc= y. The commit can only fail (as a whole) due to hardware problems or postgr= es backend crashes.

And yes: The clien= t commit returns, but the server can fail later and not persist the transac= tion and it will be lost (again as a whole).
Your application= should be able to tolerate losing the latest committed transactions if you= use this.

The difference to fsync=3Doff is that a= server crash will leave the database is a consistent state with just the l= atest transactions lost.


From: Anibal David Acosta <aa@devshock.com>
To: pgsql-performance@postgresql= .org
Sent: Monday, Augu= st 1, 2011 6:29 AM
Subject:= [PERFORM] synchronous_commit off

<= div class=3D"yiv2121105660WordSection1">
Can a transaction committed asynchronously report an error, duplicate ke= y or something like that, causing a client with a OK transaction but server= with a FAILED transaction.
&nb= sp;
Thanks
 


--0-212104951-1312330088=:11904--