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

From Michael Paquier
Subject Tighten error control for OpenTransientFile/CloseTransientFile
Date
Msg-id 20190301023338.GD1348@paquier.xyz
Whole thread Raw
Responses Re: Tighten error control for OpenTransientFile/CloseTransientFile
List pgsql-hackers
Hi all,

Joe's message here has reminded me that we have lacked a lot of error
handling around CloseTransientFile():
https://www.postgresql.org/message-id/c49b69ec-e2f7-ff33-4f17-0eaa4f2cef27@joeconway.com

This has been mentioned by Alvaro a couple of months ago (cannot find
the thread about that at quick glance), and I just forgot about it at
that time.  Anyway, attached is a patch to do some cleanup for all
that:
- Switch OpenTransientFile to read-only where sufficient.
- Add more error handling for CloseTransientFile
A major take of this patch is to make sure that the new error messages
generated have an elevel consistent with their neighbors.

Just on time for this last CF.  Thoughts?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Richard Guo
Date:
Subject: Re: NOT IN subquery optimization
Next
From: Michael Paquier
Date:
Subject: Re: Prevent extension creation in temporary schemas