Re: Does PostgreSQL use atomic file creation of FS?

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Dmitry Lazurkin <dilaz03(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Does PostgreSQL use atomic file creation of FS?
Date: 2018-12-12 21:26:36
Message-ID: c2f14b0954fc276e5583d0f7dc940925575c86a3.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Munro 2018-12-12 21:34:27 Re: Does PostgreSQL use atomic file creation of FS?
Previous Message Abraham, Danny 2018-12-12 18:33:13 psql output in Japanese Code Page