Re: pros/cons of using "synchronous commit=off" - AWS in particular - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: pros/cons of using "synchronous commit=off" - AWS in particular
Date
Msg-id 20140620151135.GU18688@eldon.alvh.no-ip.org
Whole thread Raw
In response to Re: pros/cons of using "synchronous commit=off" - AWS in particular  (Larry Prikockis <lprikockis@vecna.com>)
List pgsql-general
Larry Prikockis wrote:

> ok... so maybe a better question would be: other than cases of power
> failure or something else that caused the server to shut down
> unexpectedly and uncleanly, what is the actual risk of data loss? In
> my case, the possibility of losing a recent transaction or two in
> the hopefully uncommon case of some catastrophic failure might very
> well be acceptable in exchange for increased write performance.
>
> random/unpredictable risk of data loss or corruption for other
> reasons is probably NOT acceptable to me though, regardless of the
> performance gain.

[Barring software bugs,j asynchronous commit does not cause data
corruption or unpredictable data loss.  You can lose the last batch of
transactions on a crash, but even if you do, the data written by
previous transactions is valid.

Worst case of # of transactions lost is determined by 3x
wal_writer_delay.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


pgsql-general by date:

Previous
From: Marti Raudsepp
Date:
Subject: Re: Best backup strategy for production systems
Next
From: Steve Crawford
Date:
Subject: Re: How can I get first day date of the previous month ?