Re: Tighten error control for OpenTransientFile/CloseTransientFile - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Tighten error control for OpenTransientFile/CloseTransientFile
Date
Msg-id 20190302004022.GA1602@paquier.xyz
Whole thread Raw
In response to Re: Tighten error control for OpenTransientFile/CloseTransientFile  (Joe Conway <mail@joeconway.com>)
Responses Re: Tighten error control for OpenTransientFile/CloseTransientFile
List 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

Attachment

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: NOT IN subquery optimization
Next
From: Tom Lane
Date:
Subject: Re: VACUUM can finish an interrupted nbtree page split -- is that okay?