Should SQLite users be setting barrier=1?

Dan Kennedy danielk1977 at gmail.com
Tue Jul 13 16:56:24 UTC 2010


> If you do not use barriers, your storage device could very well lose  
> data if it loses power. There is no easy answer, you need to  
> understand the type and configuration of your storage.
>
> For a local SAS/S-ATA drive, you should have barriers enabled when  
> the write cache is enabled (check that with hdparm for example on S- 
> ATA). Note that you could also be safe by disabling the write cache  
> and leaving barriers off as well.
>
> If you have a non-volatile write cache (for example on an external,  
> enterprise class array), you can safely mount without barriers.
>
> Regards,
>
> Ric



Hi Ric,

Thanks very much for the quick response (and Eric, thanks
as well).

Richard put a paragraph with a link to your answer in
our documentation here:

   http://www.sqlite.org/draft/lockingv3.html#ext3-barrier-problem

Please let us know if this misrepresents the situation.
Or if there is something else we should add to clarify
it.

Thanks again,
Dan.





More information about the Ext3-users mailing list