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

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Raphael Hertzog <hertzog(at)debian(dot)org>
Cc: PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>, Teodor Sigaev <teodor(at)sigaev(dot)ru>
Subject: Re: Fails to work on live images due to fsync() on pg_commit_ts before doing any write there
Date: 2017-11-07 14:18:04
Message-ID: CAB7nPqSwjeovBHqSUZXg3wfj8Yv8Z4=JDZ+iDyk96rQEAQvw-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Nov 7, 2017 at 10:54 PM, Raphael Hertzog <hertzog(at)debian(dot)org> wrote:
> This has been explained by the overlayfs upstream developer
> (to which I reported this bug initially, thinking it was an
> overlayfs regression):
> https://marc.info/?l=linux-unionfs&m=151005246512873&w=2
> https://marc.info/?l=linux-unionfs&m=151005699414227&w=2
>
> My request is thus that PostgreSQL should fsync that directory only after
> it has made changes to the directory or its content. PostgreSQL 9.6 was
> working fine in the same setup and I would like PostgreSQL 10 to do the
> same. :)
>
> I'm ccing Teodor Sigaev <teodor(at)sigaev(dot)ru> because I believe that
> the problematic fsync() has been added by him in this commit:
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=1b02be21f271db6bd3cd43abb23fa596fcb6bac3

Hm. I am wondering if we should change fsync_fname_ext() so as EINVAL
is considered as a no-op. EIO and EINTR should really be caught with a
proper error, but I am not sure about this one. Thoughts?
--
Michael

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephen Frost 2017-11-07 14:18:28 Re: Fails to work on live images due to fsync() on pg_commit_ts before doing any write there
Previous Message Alvaro Herrera 2017-11-07 14:13:38 Re: Fails to work on live images due to fsync() on pg_commit_ts before doing any write there