| From: | Jaime Casanova <jaime(at)2ndquadrant(dot)com> |
|---|---|
| To: | "Schubert, Joerg" <jschubert(at)cebacus(dot)de> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: synchronous replication + fsync=off? |
| Date: | 2011-11-17 16:07:32 |
| Message-ID: | CAJKUy5it4Pd+4DsQw+KzDWJFjadejGFR_JJJ65SAmeSjVWPsgw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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)
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Scott Marlowe | 2011-11-17 16:21:36 | Re: synchronous replication + fsync=off? |
| Previous Message | Tom Lane | 2011-11-17 15:59:10 | Re: Is it ever necessary to vacuum a table that only gets inserts/updates? |