Re: Memory leaks in BufFileOpenShared()

From: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
To: ah(at)cybertec(dot)at
Cc: thomas(dot)munro(at)enterprisedb(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Memory leaks in BufFileOpenShared()
Date: 2018-06-15 08:22:08
Message-ID: 20180615.172208.29879168502273778.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseeev 2018-06-15 08:33:58 Re: [GSoC] current working status
Previous Message Antonin Houska 2018-06-15 07:59:26 Re: Memory leaks in BufFileOpenShared()