Re: BUG #16190: The usage of NULL pointer in refint.c

From: Andres Freund <andres(at)anarazel(dot)de>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,starbugs(at)qq(dot)com,pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16190: The usage of NULL pointer in refint.c
Date: 2020-01-07 06:45:08
Message-ID: 8E6576C7-9CC1-47AB-BE4D-F545345029AB@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On January 6, 2020 10:44:12 PM PST, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>On Mon, Jan 06, 2020 at 06:26:54PM -0800, Andres Freund wrote:
>> On 2020-01-06 21:12:05 -0500, Tom Lane wrote:
>>> WFM. There are probably more elegant ways to do it than to drop
>this
>>> stuff into TopMemoryContext, but this is surely better than
>unchecked
>>> malloc calls.
>>
>> Yea, it's certainly better than the current situation. An incremental
>> improvement would be to do the allocations in a separate contect, for
>easier
>> debugging should there ever be a leak...
>
>Sure. I am not sure if that's worth the extra work though, so I would
>just be tempted to commit the patch that moves the allocation to
>TopMemoryContext and call it a day. Any objections to that?

Not from here
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Mithun Cy 2020-01-07 07:22:00 DROP OWNED CASCADE vs Temp tables
Previous Message Michael Paquier 2020-01-07 06:44:12 Re: BUG #16190: The usage of NULL pointer in refint.c