Re: Tighten error control for OpenTransientFile/CloseTransientFile

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Tighten error control for OpenTransientFile/CloseTransientFile
Date: 2019-03-02 00:40:22
Message-ID: 20190302004022.GA1602@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 01, 2019 at 05:05:54PM -0500, Joe Conway wrote:
> Seems like it would be better to modify the arguments to
> CloseTransientFile() to include the filename being closed, errorlevel,
> and fail_on_error or something similar. Then all the repeated ereport
> stanzas could be eliminated.

Sure. Now some code paths close file descriptors without having at
hand the file name, which would mean that we'd need to pass NULL as
argument in this case. That's not really elegant in my opinion. And
having a consistent mapping with the system's close() is not really
bad to me either..
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-03-02 00:41:06 Re: VACUUM can finish an interrupted nbtree page split -- is that okay?
Previous Message David Rowley 2019-03-02 00:11:46 Re: NOT IN subquery optimization