Florian Weimer <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> You can only fsync one FD at a time (too bad ... if there were a >> multi-file-fsync API it'd solve the overspecified-write-ordering issue).
> What about aio_fsync()? (1) it's unportable; (2) it's not clear that it's any improvement over fsync(). The Single Unix Spec says aio_fsync "returns when the synchronisation request has been initiated or queued to the file or device". Depending on how the implementation works, this may mean that all the dirty blocks have been scheduled for I/O and will be written ahead of subsequently scheduled blocks --- if so, the results are not really different from fsync()'ing the files in the same order. The best idea I've heard so far is the one about sync() followed by a bunch of fsync()s. That seems to be correct, efficient, and dependent only on very-long-established Unix semantics. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings