Re: Memory-leak in BackgroundWriter(and Checkpointer)

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Naoya Anzai <anzai-naoya(at)mxu(dot)nes(dot)nec(dot)co(dot)jp>, pgsql-bugs(at)postgresql(dot)org, Akio Iwaasa <iwaasa(at)mxs(dot)nes(dot)nec(dot)co(dot)jp>
Subject: Re: Memory-leak in BackgroundWriter(and Checkpointer)
Date: 2013-06-04 18:02:29
Message-ID: 20130604180229.GJ5871@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

* Andres Freund (andres(at)2ndquadrant(dot)com) wrote:
> Seems more consistent with the rest of the code too. But anyway, I am
> fine with fixing it either way.

Patch attached which mirrors what GetRunningTransactionData() (the other
function called from LogStandbySnapshot) does, more-or-less- uses a
static variable to keep track of memory allocated for the data being
returned to the caller.

Looks like this will need to be back-patched to 9.0. Barring objections
or better ideas, I'll do that in a few hours.

Thanks,

Stephen

Attachment Content-Type Size
hs_memleak.patch text/x-diff 4.7 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephen Frost 2013-06-04 18:05:25 Re: Memory-leak in BackgroundWriter(and Checkpointer)
Previous Message Tom Lane 2013-06-04 17:53:03 Re: Memory-leak in BackgroundWriter(and Checkpointer)