From: Alexey Ermakov <alexey.ermakov@dataegret.com>
To: David Rowley <dgrowleyml@gmail.com>
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17844: Memory consumption for memoize node
Date: Mon, 20 Mar 2023 12:23:11 +0600
Message-ID: <bccbeb7e-e945-6aa8-7610-7df1057d774a@dataegret.com> (raw)
In-Reply-To: <CAApHDvqGErGuyBfQvBQrTCHDbzLTqoiW=_G9sOzeFxWEc_7auA@mail.gmail.com>
References: <17844-d2f6f9e75a622bed@postgresql.org>
<CAApHDvpvfmgkSxTG-3+kVTFdVtbb+_s0ta4qz+6ovXZQqqtRWQ@mail.gmail.com>
<CAApHDvqGErGuyBfQvBQrTCHDbzLTqoiW=_G9sOzeFxWEc_7auA@mail.gmail.com>
On 2023-03-19 15:33, David Rowley wrote:
> On Sat, 18 Mar 2023 at 13:22, David Rowley <dgrowleyml@gmail.com> wrote:
>> It seems to be related to a bug in nodeMemoize.c where we're
>> evaluating the cache key expressions in the ExecutorState context. We
>> should really be in a more temporary context that gets reset early in
>> cache_lookup() before the call to prepare_probe_slot(). I'll need to
>> look in a bit more detail about what that context actually should be.
> I've attached fix_memoize_memory_leak.patch to address this.
>
> Using your test case, here are the memory stats before and after the
> fix (taken during ExecEndMemoize).
>
Thanks a lot! Could you please point me in the direction how to get such
memory stats ? I might know another memory leak I'd like to check but
sadly I don't know right tools to measure memory usage.
--
Thanks,
Alexey Ermakov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: alexey.ermakov@dataegret.com, dgrowleyml@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17844: Memory consumption for memoize node
In-Reply-To: <bccbeb7e-e945-6aa8-7610-7df1057d774a@dataegret.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox