Re: [bug fix] Memory leak in dblink

From: "MauMau" <maumau307(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Joe Conway" <mail(at)joeconway(dot)com>
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-20 06:53:35
Message-ID: 43A3F17A96F245BF8E81C8580BE4107B@maumau
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2014-06-20 08:04:06 Re: inherit support for foreign tables
Previous Message Amit Langote 2014-06-20 05:54:32 Re: Proposal for CSN based snapshots