Re: Memory leaks in BufFileOpenShared() - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: Memory leaks in BufFileOpenShared()
Date
Msg-id 20180615.172208.29879168502273778.t-ishii@sraoss.co.jp
Whole thread Raw
In response to Re: Memory leaks in BufFileOpenShared()  (Antonin Houska <ah@cybertec.at>)
Responses Re: Memory leaks in BufFileOpenShared()
List pgsql-hackers
> Now I see that BufFileCreateShared() has similar problem with file->name.

Right.

> More generic problem I see is that the common initialization of BufFile is
> repeated a few times. The attached patch tries to improve that (it also fixes
> the duplicate allocation of file->name).

The changes were made by this commit to add infrastructure for sharing
temporary files between backends, according to the author (Thomas
Munro).

https://git.postgresql.org/pg/commitdiff/dc6c4c9dc2a111519b76b22daaaac86c5608223b

Your proposal looks reasonable but I would like to hear from Thomas's
opinion as well.

Thomas?

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


pgsql-hackers by date:

Previous
From: Antonin Houska
Date:
Subject: Re: Memory leaks in BufFileOpenShared()
Next
From: Aleksander Alekseeev
Date:
Subject: Re: [GSoC] current working status