Re: no universally correct setting for fsync

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: no universally correct setting for fsync
Date: 2010-05-07 14:38:47
Message-ID: 4BE425F7.30804@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

Kevin Grittner wrote:
>
> There are dire-sounding statements interspersed with:
>
> | using fsync results in a performance penalty
>
> | Due to the risks involved, there is no universally correct setting
> | for fsync.
>
> | If you trust your operating system, your hardware, and your
> | utility company (or your battery backup), you can consider
> | disabling fsync.
>
> Isn't this a little too rosy a picture to paint?
>
>
>

I think the critical question is really whether you are prepared to lose
your database.

I have a customer who rotates databases in and out of line, and
processes major updates on the out of line database. If they lose the
database occasionally they are prepared to wear that risk for the
performance gain they get from running with fsync off. It just means
that they have to recover and so the inline database will get a bit
staler than usual while they do.

So I think its true that there is no universally right answer. Maybe the
criteria mentioned in the last para need tweaking some, though. It's not
just a matter of trusting hardware etc. I have seen mishaps when idiots
knock out power cords and the like. The unexpected does sometime happen,
despite the best planning.

cheers

andrew

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Kevin Grittner 2010-05-07 14:48:53 Re: no universally correct setting for fsync
Previous Message Tom Lane 2010-05-07 14:24:47 Re: no universally correct setting for fsync

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2010-05-07 14:44:57 Re: PATCH: Minor notes in CLUSTER page
Previous Message Robert Haas 2010-05-07 14:36:10 beta to release