pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: starbugs@qq.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16190: The usage of NULL pointer in refint.c
Date: Tue, 7 Jan 2020 15:44:12 +0900
Message-ID: <20200107064412.GG2386@paquier.xyz> (raw)
In-Reply-To: <20200107022654.vgfwx7hactiokcsa@alap3.anarazel.de>
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>
	<20200107022654.vgfwx7hactiokcsa@alap3.anarazel.de>

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?
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (11+ messages)  latest in thread

Message-ID: <20200107064412.GG2386@paquier.xyz>
Permalink:  ../20200107064412.GG2386@paquier.xyz/
Also on:    postgresql.org/message-id/20200107064412.GG2386@paquier.xyz

 · 

reply

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: michael@paquier.xyz, andres@anarazel.de, tgl@sss.pgh.pa.us, starbugs@qq.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #16190: The usage of NULL pointer in refint.c
  In-Reply-To: <20200107064412.GG2386@paquier.xyz>

* 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