The attached SQL causes a crash in 9.1. It appears to be caused by: d1001a78ce612a16ea622b558f5fc2b68c45ab4c
The patch tries to copy all of the important data out of the child context before it's reset; but it doesn't get everything. For instance, grouping_planner() allocates subroot.glob->paramlist, and uses it in subsequent iterations; but that isn't copied before the context is reset. It looks like there are other things that need copying as well, but it wasn't immediately clear to me what the best fix is. Regards, Jeff Davis
begin; create table parent1( a int); create table child1 ( b int) inherits(parent1); DELETE FROM parent1 USING (SELECT (SELECT a FROM parent1)) s;
-- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs