Re: [bug fix] Memory leak in dblink

From: "MauMau" <maumau307(at)gmail(dot)com>
To: "Joe Conway" <mail(at)joeconway(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Amit Kapila" <amit(dot)kapila16(at)gmail(dot)com>, "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [bug fix] Memory leak in dblink
Date: 2014-06-19 22:38:06
Message-ID: 754FA21D1384477EAA86FE5F05004906@maumau
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: "Joe Conway" <mail(at)joeconway(dot)com>
> Fair enough -- this patch does it at that level in
> materializeQueryResult()

I'm in favor of this. TBH, I did this at first, but I was afraid this would
be rejected due to the reason mentioned earlier.

if statement in PG_TRY block is not necessary like this, because sinfo is
zero-cleared.

PG_TRY();
{
+ /* Create short-lived memory context for data conversions */
+ sinfo.tmpcontext = AllocSetContextCreate(CurrentMemoryContext,
+ "dblink temporary context",

Regards
MauMau

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-06-19 22:48:17 Re: -DDISABLE_ENABLE_ASSERT
Previous Message Josh Berkus 2014-06-19 22:33:07 Re: idle_in_transaction_timeout