Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gXC1r-0006NA-Fu for pgsql-general@arkaria.postgresql.org; Wed, 12 Dec 2018 21:26:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gXC1p-00084l-Nf for pgsql-general@arkaria.postgresql.org; Wed, 12 Dec 2018 21:26:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gXC1p-00084d-Bs for pgsql-general@lists.postgresql.org; Wed, 12 Dec 2018 21:26:49 +0000 Received: from mx1.mailbox.org ([2001:67c:2050:104:0:1:25:1]) by makus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gXC1l-0008Kz-C2 for pgsql-general@lists.postgresql.org; Wed, 12 Dec 2018 21:26:47 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 2EE254C293; Wed, 12 Dec 2018 22:26:39 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id ygIfXpWBmwyj; Wed, 12 Dec 2018 22:26:37 +0100 (CET) Message-ID: Subject: Re: Does PostgreSQL use atomic file creation of FS? From: Laurenz Albe To: Dmitry Lazurkin , pgsql-general@lists.postgresql.org Date: Wed, 12 Dec 2018 22:26:36 +0100 In-Reply-To: References: Organization: Cybertec Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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. If there is a crash, the file would be left behind. This is slightly annoying, but shouldn't be a major problem. Persisting such information in a crash-safe way would require fsyncs that hurt I/O performance. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com