Re: unconstrained memory growth in long running procedure stored procedure after upgrading 11-12

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: unconstrained memory growth in long running procedure stored procedure after upgrading 11-12
Date: 2021-03-31 15:01:02
Message-ID: CAHyXU0xtTcCVsPuT21kVE+RjE9zVMFZRLi6Pg1T5G=u09nx79Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 30, 2021 at 7:14 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Justin Pryzby <pryzby(at)telsasoft(dot)com> writes:
> > On Tue, Mar 30, 2021 at 04:17:03PM -0500, Merlin Moncure wrote:
> >> We just upgraded from postgres 11 to 12.6 and our server is running
> >> out of memory and rebooting about 1-2 times a day.
>
> > I haven't tried your test, but this sounds a lot like the issue I reported with
> > JIT, which is enabled by default in v12.
>
> FWIW, I just finished failing to reproduce any problem with that
> test case ... but I was using a non-JIT-enabled build.

Yep. Disabling jit (fully, fia jit=off, not what was suggested
upthread) eliminated the issue, or at least highly mitigated the leak.
I was using pgdg rpm packaging, which enables jit by default. Thanks
everyone for looking at this, and the workaround is quick and easy.

merlin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kohei KaiGai 2021-03-31 15:09:01 Re: TRUNCATE on foreign table
Previous Message Jaime Casanova 2021-03-31 14:47:08 Re: cursor already in use, UPDATE RETURNING bug?