pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <pgsql@j-davis.com>
To: pgsql-bugs@postgresql.org
Subject: inheritance_planner() bug in 9.1
Date: Wed, 12 Jan 2011 14:52:06 -0800
Message-ID: <1294872726.30091.37.camel@jdavis-ux.asterdata.local> (raw)

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

Attachments:

crash2.sql (text/x-sql, 147B) download begin; create table parent1( a int); create table child1 ( b int) inherits(parent1); DELETE FROM parent1 USING (SELECT (SELECT a FROM parent1)) s;

view thread (2+ messages)  latest in thread

Message-ID: <1294872726.30091.37.camel@jdavis-ux.asterdata.local>
Permalink:  ../1294872726.30091.37.camel@jdavis-ux.asterdata.local/
Also on:    postgresql.org/message-id/1294872726.30091.37.camel@jdavis-ux.asterdata.local

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: pgsql@j-davis.com
  Subject: Re: inheritance_planner() bug in 9.1
  In-Reply-To: <1294872726.30091.37.camel@jdavis-ux.asterdata.local>
  References: <1294872726.30091.37.camel@jdavis-ux.asterdata.local>

* 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