| From: | Joe Conway <mail(at)joeconway(dot)com> |
|---|---|
| To: | Michael Paquier <michael(at)paquier(dot)xyz>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: get_controlfile() can leak fds in the backend |
| Date: | 2019-02-28 00:45:11 |
| Message-ID: | 22d70be7-9334-bfdc-a071-2efca3c52b98@joeconway.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 2/27/19 10:26 AM, Joe Conway wrote:
> On 2/27/19 2:47 AM, Michael Paquier wrote:
>> Hi all,
>> (CC-ing Joe as of dc7d70e)
> According to that comment BasicOpenFile does not seem to solve the issue
> you are pointing out (leaking of file descriptor on ERROR). Perhaps
> OpenTransientFile() is more appropriate? I am on the road at the moment
> so have not looked very deeply at this yet though.
It seems to me that OpenTransientFile() is more appropriate. Patch done
that way attached.
Joe
--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development
| Attachment | Content-Type | Size |
|---|---|---|
| controldata_utils-fdfix-01.diff | text/x-patch | 1.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tsunakawa, Takayuki | 2019-02-28 00:48:18 | RE: reloption to prevent VACUUM from truncating empty pages at the end of relation |
| Previous Message | Amit Kapila | 2019-02-28 00:24:11 | Re: pgsql: Avoid creation of the free space map for small heap relations, t |