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

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Larry Prikockis <lprikockis(at)vecna(dot)com>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: pros/cons of using "synchronous commit=off" - AWS in particular
Date: 2014-06-20 15:11:35
Message-ID: 20140620151135.GU18688@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Steve Crawford 2014-06-20 15:12:14 Re: How can I get first day date of the previous month ?
Previous Message Marti Raudsepp 2014-06-20 15:03:09 Re: Best backup strategy for production systems