Re: synchronous replication + fsync=off?

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
Cc: "Schubert, Joerg" <jschubert(at)cebacus(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: synchronous replication + fsync=off?
Date: 2011-11-17 16:21:36
Message-ID: CAOR=d=2TJvURPTiyyw72ic2A7e6DFJ3H42Svc0V4s8AUnKC5yw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Nov 17, 2011 at 9:07 AM, Jaime Casanova <jaime(at)2ndquadrant(dot)com> wrote:
> On Thu, Nov 17, 2011 at 7:52 AM, Schubert, Joerg <jschubert(at)cebacus(dot)de> wrote:
>> Hello,
>>
>> I have two servers with battery backed power supply (USV). So it is
>> unlikely, that both will crash at the same time.
>>
>> Will synchronous replication work with fsync=off?
>> That means we will commit to system cache, but not to disk. Data will not
>> survive a system crash but the second system should still be consistent.
>>
>
> you should never use fsync=off (in production at least)

That's not entirely true. for instance, session servers are fine with
fsync=off because the data in them is only alive while the session is
up. Corrupted database means reinit db, restore schema, put back in
loop. But yeh for data that means anything, fsync off is a bad idea.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tomas Vondra 2011-11-17 16:26:32 Re: synchronous replication + fsync=off?
Previous Message Jaime Casanova 2011-11-17 16:07:32 Re: synchronous replication + fsync=off?