From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: starbugs@qq.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16190: The usage of NULL pointer in refint.c
Date: Mon, 6 Jan 2020 18:26:54 -0800
Message-ID: <20200107022654.vgfwx7hactiokcsa@alap3.anarazel.de> (raw)
In-Reply-To: <7984.1578363125@sss.pgh.pa.us>
References: <16190-70181c803641c3dc@postgresql.org>
<20200106051800.GL3598@paquier.xyz>
<1234.1578291695@sss.pgh.pa.us>
<20200106174443.3pwnmshbxrbwggrm@alap3.anarazel.de>
<20200107012741.GD2386@paquier.xyz>
<7984.1578363125@sss.pgh.pa.us>
On 2020-01-06 21:12:05 -0500, Tom Lane wrote:
> Michael Paquier <michael@paquier.xyz> writes:
> > On Mon, Jan 06, 2020 at 09:44:43AM -0800, Andres Freund wrote:
> >> I think we should consider either moving this out of contrib, or fixing
> >> it up. test/example code is fine, but contrib gets installed by default
> >> for a lot of people... And yea, this isn't just about contrib/spi.
>
> > No idea about moving that out of contrib/, but here is a patch to fix
> > things that just moves the allocations to TopMemoryContext and removes
> > the system calls.
>
> 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...
- Andres
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: andres@anarazel.de, tgl@sss.pgh.pa.us, michael@paquier.xyz, starbugs@qq.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16190: The usage of NULL pointer in refint.c
In-Reply-To: <20200107022654.vgfwx7hactiokcsa@alap3.anarazel.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox