Re: Dangers of fsync = off

From: Bill Moran <wmoran(at)potentialtech(dot)com>
To: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
Cc: Joel Dice <dicej(at)mailsnare(dot)net>, Andrew Sullivan <ajs(at)crankycanuck(dot)ca>, Postgres general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Dangers of fsync = off
Date: 2007-05-09 13:53:31
Message-ID: 20070509095331.26e6184a.wmoran@potentialtech.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In response to Csaba Nagy <nagy(at)ecircle-ag(dot)com>:

> > [snip] Take the example of a query "UPDATE tablename SET x = x + 1".
> > When this query is erroneously issued twice, data corruption will occur.
>
> Huh ? I thought slony is replicating data, not queries... what on the
> master is "UPDATE tablename SET x = x + 1" will translate to "UPDATE
> tablename SET x = new_value" on the slave, where new_value equals that x
> + 1. That's why slony is working well even if you do "UPDATE tablename
> SET x = now()".

True. My mistake.

I still wouldn't trust Slony with fsync off. Another scenario would be
the Slony trigger writes a change to the Slony DB, the db crashes before
it gets committed to disk. When the DB is started, no errors prevent
startup, but that transaction is lost.

I mean, you have to weight all these possibilities against your tolerance
for data loss. If you're a bank, none of this is acceptable. If you're
MySpace, who f*cking cares if you lose data (I saw an article where the
CIO of MySpace admitted that was their policy -- must be nice to have a
job where nobody cares if you do it wrong!)

--
Bill Moran
http://www.potentialtech.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Naz Gassiep 2007-05-09 14:13:42 In theory question
Previous Message Csaba Nagy 2007-05-09 13:40:08 Re: Dangers of fsync = off