Re: pgsql: Fix failure to check for open() or fsync() failures.

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Postgres hackers <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Subject: Re: pgsql: Fix failure to check for open() or fsync() failures.
Date: 2018-12-27 01:09:18
Message-ID: 20181227010918.GC2106@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Wed, Dec 26, 2018 at 05:55:36PM -0500, Tom Lane wrote:
> It appears to me that the code is intentionally not worrying about
> fsync failure, so it seems wrong for it to FATAL out if it's unable
> to open the file to fsync it. And it surely shouldn't do so if the
> file isn't there.

My point is a bit different though: it seems to me that we could just
call BasicOpenFilePerm() and remove the stat() to do exactly the same
things, simplifying the code.
--
Michael

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2018-12-27 01:19:54 pgsql: Ignore inherited temp relations from other sessions when truncat
Previous Message Tom Lane 2018-12-26 22:55:36 Re: pgsql: Fix failure to check for open() or fsync() failures.

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-12-27 01:15:34 Re: Offline enabling/disabling of data checksums
Previous Message Tsunakawa, Takayuki 2018-12-27 00:26:36 RE: removal of dangling temp tables