From: Andres Freund <andres@anarazel.de>
To: Raphael Hertzog <hertzog@debian.org>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Fails to work on live images due to fsync() on pg_commit_ts before doing any write there
Date: Tue, 7 Nov 2017 07:13:47 -0800
Message-ID: <20171107151347.77vumrbitqbzdzaf@alap3.anarazel.de> (raw)
In-Reply-To: <20171107150602.yt7jrju2a2jhx6w4@home.ouaza.com>
References: <20171107135454.lbelbbvfgadljmuj@home.ouaza.com>
<20171107141338.getbacqd2vich7yi@alvherre.pgsql>
<20171107141827.GW4628@tamriel.snowman.net>
<20171107144727.m6w4psl5kwm2p7jl@home.ouaza.com>
<20171107144858.GX4628@tamriel.snowman.net>
<20171107150602.yt7jrju2a2jhx6w4@home.ouaza.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On 2017-11-07 16:06:02 +0100, Raphael Hertzog wrote:
> On Tue, 07 Nov 2017, Stephen Frost wrote:
> > Raphael,
> >
> > * Raphael Hertzog (hertzog@debian.org) wrote:
> > > Still I believe that this issue should be fixed in both sides. It's not
> > > smart from PostgreSQL to call fsync() when it has not made any change.
> >
> > Why?
>
> Because it's useless. Why call fsync() when you know that it doesn't do
> anything?
It's not generally useless, no. You don't know if the relevant directory
hasn't been modified since postgres was started last / crashed
last. That matters for the durability and atomicity of renames
etc. There's simply no way to track that in postgres, given it's
arbitrary external effects.
Greetings,
Andres Freund
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: andres@anarazel.de, hertzog@debian.org, sfrost@snowman.net, alvherre@alvh.no-ip.org
Subject: Re: Fails to work on live images due to fsync() on pg_commit_ts before doing any write there
In-Reply-To: <20171107151347.77vumrbitqbzdzaf@alap3.anarazel.de>
References: <20171107135454.lbelbbvfgadljmuj@home.ouaza.com> <20171107141338.getbacqd2vich7yi@alvherre.pgsql> <20171107141827.GW4628@tamriel.snowman.net> <20171107144727.m6w4psl5kwm2p7jl@home.ouaza.com> <20171107144858.GX4628@tamriel.snowman.net> <20171107150602.yt7jrju2a2jhx6w4@home.ouaza.com> <20171107151347.77vumrbitqbzdzaf@alap3.anarazel.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox