Tighten error control for OpenTransientFile/CloseTransientFile

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

Hi all,

Joe's message here has reminded me that we have lacked a lot of error
handling around CloseTransientFile():

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
- 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?

Attachment Content-Type Size
transient-fd-error-v1.patch text/x-diff 12.5 KB


Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-03-01 02:43:04 Re: Prevent extension creation in temporary schemas
Previous Message Richard Guo 2019-03-01 02:27:04 Re: NOT IN subquery optimization