Re: Fails to work on live images due to fsync() on pg_commit_ts before doing any write there

From: Raphael Hertzog <hertzog(at)debian(dot)org>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Fails to work on live images due to fsync() on pg_commit_ts before doing any write there
Date: 2017-11-07 15:06:02
Message-ID: 20171107150602.yt7jrju2a2jhx6w4@home.ouaza.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, 07 Nov 2017, Stephen Frost wrote:
> Raphael,
>
> * Raphael Hertzog (hertzog(at)debian(dot)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?

And because I have just shown that doing this can have unexpected
side-effects in some specific conditions.

But this is really a matter of aesthetics and trade-offs. I don't know the
code. It might be difficult to track the fact that changes have been made.

Cheers,
--
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: https://www.freexian.com/services/debian-lts.html
Learn to master Debian: https://debian-handbook.info/get/

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2017-11-07 15:06:55 Re: Fails to work on live images due to fsync() on pg_commit_ts before doing any write there
Previous Message Andres Freund 2017-11-07 15:01:16 Re: Fails to work on live images due to fsync() on pg_commit_ts before doing any write there