Re: get_controlfile() can leak fds in the backend - Mailing list pgsql-hackers

From Joe Conway
Subject Re: get_controlfile() can leak fds in the backend
Date
Msg-id 22d70be7-9334-bfdc-a071-2efca3c52b98@joeconway.com
Whole thread Raw
In response to Re: get_controlfile() can leak fds in the backend  (Joe Conway <mail@joeconway.com>)
Responses Re: get_controlfile() can leak fds in the backend
List 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

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: pgsql: Avoid creation of the free space map for small heaprelations, t
Next
From: "Tsunakawa, Takayuki"
Date:
Subject: RE: reloption to prevent VACUUM from truncating empty pages at theend of relation