Re: [bug fix] Memory leak in dblink - Mailing list pgsql-hackers

From MauMau
Subject Re: [bug fix] Memory leak in dblink
Date
Msg-id 43A3F17A96F245BF8E81C8580BE4107B@maumau
Whole thread Raw
In response to Re: [bug fix] Memory leak in dblink  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
From: "Tom Lane" <tgl@sss.pgh.pa.us>
> In the first query, the MemoryContextReset is nearly free since there's
> nothing to free (and we've special-cased that path in aset.c).  It's
> certainly a measurement artifact that it measures out faster, which says
> to me that these numbers can only be trusted within a couple percent;
> but at least we're not taking much hit in cases where the patch isn't
> actually conferring any benefit.  For the second query, losing 1% to avoid
> memory bloat seems well worthwhile.
>
> Barring objections I'll apply and back-patch this.

So this patch would solve memory leak issues if other modules had similar 
bugs, in addition to the original dblink problem, wouldn't this?  Definitely 
+1.  The original OP wants to use 9.2.  I'll report to him when you've 
committed this nce patch.  Thanks, Tom san.

Regards
MauMau






pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Proposal for CSN based snapshots
Next
From: Kyotaro HORIGUCHI
Date:
Subject: Re: inherit support for foreign tables