Thank you. But I have read this. I said about network file system only for example. I would like to known how PostgreSQL handles this specific case (of course if someone knowns a answer): fd = open(file, "w"); write(fd, data); // crash and now I have empty file which isn't correct fsync(fd); PS. I think PostgreSQL doesn't have this problem. On 12/12/18 15:37, Karsten Hilbert wrote: > On Wed, Dec 12, 2018 at 02:48:12PM +0300, Dmitry Lazurkin wrote: > >> Does PostgreSQL use atomic file creation on FS? How does PostgreSQL >> catch situation when system crashes between open call and write call? I >> am interesting in this because I would like use PostgreSQL on network >> file system. > I doubt we can get more certainty than this: > > https://www.postgresql.org/docs/devel/creating-cluster.html#CREATING-CLUSTER-NFS > > Best, > Karsten