pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: terminate called after throwing an instance of 'std::bad_alloc'
Date: Fri, 28 May 2021 12:08:29 -0500
Message-ID: <20210528170829.GK2082@telsasoft.com> (raw)
In-Reply-To: <20210517002936.GD373@telsasoft.com>

There's a memory leak affecting JIT expressions, even when inlining,
optimization, and tuple deforming are disabled.

The server that got OOM after installing PG13.3 (because your patch wasn't
applied) still gets OOM even with inline_above_cost=-1, optimize_above_cost=-1,
and deforming=off.

Actually I think this is an even more severe leak, even though it seems to be
infrequent.  The inlining leak is slow enough that I don't think that it,
alone, would cause a crash.  It's possible there's a race condition or
something that makes this hard to notice or reproduce, or the inlining leak is
just easier to find.

I guess your patch avoids this issue, too, since it didn't OOM with your patch.

-- 
Justin





view thread (28+ messages)  latest in thread

Message-ID: <20210528170829.GK2082@telsasoft.com>
Permalink:  ../20210528170829.GK2082@telsasoft.com/
Also on:    postgresql.org/message-id/20210528170829.GK2082@telsasoft.com

 · 

reply

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-hackers@postgresql.org
  Cc: pryzby@telsasoft.com, andres@anarazel.de, tgl@sss.pgh.pa.us
  Subject: Re: terminate called after throwing an instance of 'std::bad_alloc'
  In-Reply-To: <20210528170829.GK2082@telsasoft.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