Re: BUG #14843: CREATE TABLE churns through all memory, crashes db

Michael Paquier <michael.paquier@gmail.com>

From: Michael Paquier <michael.paquier@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>, ropeladder@gmail.com, PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Date: 2017-10-06T22:10:39Z
Lists: pgsql-bugs
On Sat, Oct 7, 2017 at 3:18 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Andres Freund <andres@anarazel.de> writes:
>> It's "just" a MemoryContextSwitchTo() that some idiot^WI forgot and
>> reviews didn't spot.
>
> Yeah, I had just come to the same conclusion.  I have a fix about ready
> to commit, unless you're nearly there ...

Ah, yes. I see. That makes sense.
-- 
Michael


Commits

  1. Fix intra-query memory leakage in nodeProjectSet.c.

  2. Move targetlist SRF handling from expression evaluation to new executor node.