On Thu, Nov 17, 2011 at 7:52 AM, Schubert, Joerg <jschubert@cebacus.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)
the appropiate parameter to use is synchronous_commit which is the one
that controls synchronous replication:
off = no local nor remote synchronous commit
local = local synchronous commit but no remote
on = both, local and remote, synchronous commit
synchronous commit = flushed to disk
once all that said, i guess you can use fsync on any combination (off
on master and on on standby, for your case) but i haven't tried.
anyway that will guarantee you will lose your master instalation on OS
crash and i think to remember that even if the OS doesn't crash there
is a risk (altough i can't find the mail saying that)
--
Jaime Casanova www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación