Re: [BUGS] Memory-leak in BackgroundWriter(and Checkpointer)

2013-06-11 Thread Stephen Frost
* Pawel Kozik (pawel.ko...@alcatel-lucent.com) wrote: > Any idea when it will be available in official PostgreSQL release 9.1.x or > 9.2.x ? Yes, the next set of point releases should include Tom's patch to fix this leak. Thanks, Stephen signature.asc Description: Digi

Re: [BUGS] Memory-leak in BackgroundWriter(and Checkpointer)

2013-06-11 Thread Pawel Kozik
Any idea when it will be available in official PostgreSQL release 9.1.x or 9.2.x ? -- View this message in context: http://postgresql.1045698.n5.nabble.com/Memory-leak-in-BackgroundWriter-and-Checkpointer-tp5757869p5758783.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com

Re: [BUGS] Memory-leak in BackgroundWriter(and Checkpointer)

2013-06-04 Thread Naoya Anzai
Tom, Stephen, Heikki and Andres, You do FAST work! Thanks for your prompt responses. --- Naoya Anzai NEC Soft,Ltd. http://www.necsoft.com/eng/ -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs

Re: [BUGS] Memory-leak in BackgroundWriter(and Checkpointer)

2013-06-04 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > I'm already working on back-patching the attached. Works for me, Thanks! Stephen signature.asc Description: Digital signature

Re: [BUGS] Memory-leak in BackgroundWriter(and Checkpointer)

2013-06-04 Thread Tom Lane
Stephen Frost writes: > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> I think the proposed fix is fine code-wise; the real problem here is >> crummy commenting. GetRunningTransactionLocks isn't documented as >> returning a palloc'd array, and why the heck do we have a long comment >> about its implem

Re: [BUGS] Memory-leak in BackgroundWriter(and Checkpointer)

2013-06-04 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Meh. I'm not impressed with permanently allocating an array large > enough to hold all the locks GetRunningTransactionLocks > might return --- that's potentially much larger than the other array, > and in fact I don't think we have a hard limit on its size

Re: [BUGS] Memory-leak in BackgroundWriter(and Checkpointer)

2013-06-04 Thread Stephen Frost
* Andres Freund (and...@2ndquadrant.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 sta

Re: [BUGS] Memory-leak in BackgroundWriter(and Checkpointer)

2013-06-04 Thread Tom Lane
Stephen Frost writes: > * Andres Freund (and...@2ndquadrant.com) wrote: >> Seems more consistent with the rest of the code too. But anyway, I am >> fine with fixing it either way. > And this is really the other point- having LogStandbySnapshot() need to > clean up after GetRunningTransactionLocks

Re: [BUGS] Memory-leak in BackgroundWriter(and Checkpointer)

2013-06-04 Thread Stephen Frost
* Andres Freund (and...@2ndquadrant.com) wrote: > On 2013-06-04 16:23:00 +0300, Heikki Linnakangas wrote: > > I can't get too excited about the overhead of a single palloc here. It's a > > fairly heavy operation anyway, and only runs once per checkpoint. And we > > haven't heard any actual complain

Re: [BUGS] Memory-leak in BackgroundWriter(and Checkpointer)

2013-06-04 Thread Andres Freund
On 2013-06-04 16:23:00 +0300, Heikki Linnakangas wrote: > On 04.06.2013 15:27, Stephen Frost wrote: > >* Naoya Anzai (anzai-na...@mxu.nes.nec.co.jp) wrote: > >>I've found a memory-leak bug in PostgreSQL 9.1.9's background > >>writer process. > > > >This looks legit, but probably not the right appro

Re: [BUGS] Memory-leak in BackgroundWriter(and Checkpointer)

2013-06-04 Thread Heikki Linnakangas
On 04.06.2013 15:27, Stephen Frost wrote: * Naoya Anzai (anzai-na...@mxu.nes.nec.co.jp) wrote: I've found a memory-leak bug in PostgreSQL 9.1.9's background writer process. This looks legit, but probably not the right approach to fixing it. Looks like it'd be better to work out a way to use a

Re: [BUGS] Memory-leak in BackgroundWriter(and Checkpointer)

2013-06-04 Thread Stephen Frost
* Naoya Anzai (anzai-na...@mxu.nes.nec.co.jp) wrote: > I've found a memory-leak bug in PostgreSQL 9.1.9's background > writer process. This looks legit, but probably not the right approach to fixing it. Looks like it'd be better to work out a way to use a static variable to reuse the same memory,

[BUGS] Memory-leak in BackgroundWriter(and Checkpointer)

2013-06-04 Thread Naoya Anzai
Hi All. I've found a memory-leak bug in PostgreSQL 9.1.9's background writer process. When following parameter is set, it occurs every time CHECKPOINT runs. wal_level = hot_standby I've also confirmed REL9_1_STABLE and it is not fixed yet. In additional, it also occurs in 9.3.beta1's checkpo