From: Tom Lane <tgl@sss.pgh.pa.us>
To: 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, 06 Jan 2020 01:21:35 -0500
Message-ID: <1234.1578291695@sss.pgh.pa.us> (raw)
In-Reply-To: <20200106051800.GL3598@paquier.xyz>
References: <16190-70181c803641c3dc@postgresql.org>
<20200106051800.GL3598@paquier.xyz>
Michael Paquier <michael@paquier.xyz> writes:
> On Mon, Jan 06, 2020 at 03:39:36AM +0000, PG Bug reporting form wrote:
>> We checked the code in file “refint.c” and there is one error occurring in
>> line 636.
> It could be better to switch all that to not use directly system
> calls, and rely properly on a high-level memory context with
> palloc-like allocations.
Yeah, if somebody wanted to fix this, the right way is to replace
these malloc calls with pallocs. Some investigation would be needed
about which context to use.
> ... There could be also an argument to just
> remove the module per the lack of attention it is getting, though it
> is still useful as an example of use for SPI, and the docs mention
> it for that.
The regression tests use refint too. Still, it's not production-grade
code by any means, and I'm not sure if there's much point in making
it so. I won't stand in the way if somebody else wants to ;-)
regards, tom lane
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: 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: <1234.1578291695@sss.pgh.pa.us>
* 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