On Wed, 16 Feb 2005, Scott Marlowe wrote:
I know there are write modes in ext3 that will allow corruption on power loss (I think it's writeback). I know little of XFS in a production environment, as I run ext3, warts and all.
Yeah, but even in writeback mode, ext3 doesn't lie on fsync. No FS does.
Since PG can't expect any data to be on disk _before_ fsync completes, it doesn't really make a difference. You can loose data in writeback mode _if_ the application is not fsync-ing it (XFS only "mode" is similar to writeback). I'm not aware of any case in which the system can lie about fsync(), unless the hardware is lying in turn.
One question for gurus: does PG use fsync() on dirty data pages when they are flushed to disk at checkpoint time? Does it fsync() the directory in case of file creation/deletion/rename?
.TM. -- ____/ ____/ / / / / Marco Colombo ___/ ___ / / Technical Manager / / / ESI s.r.l. _____/ _____/ _/ Colombo@xxxxxx
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq