Re: no universally correct setting for fsync - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: no universally correct setting for fsync
Date
Msg-id 4BE425F7.30804@dunslane.net
Whole thread Raw
In response to no universally correct setting for fsync  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: no universally correct setting for fsync
List 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




pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: beta to release
Next
From: Alvaro Herrera
Date:
Subject: Re: PATCH: Minor notes in CLUSTER page