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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Michael Paquier <michael.paquier@gmail.com>, ropeladder@gmail.com, PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Date: 2017-10-06T18:18:57Z
Lists: pgsql-bugs
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 ...

			regards, tom lane


Commits

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

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