Re: BUG #11457: The below query crashes 9.3.5, but not 9.3.4 - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #11457: The below query crashes 9.3.5, but not 9.3.4
Date
Msg-id CAB7nPqS3xsWezFEnyQPNajUVkrTGyKjsP3rqAETDvsw0SyDCCQ@mail.gmail.com
Whole thread Raw
In response to Re: BUG #11457: The below query crashes 9.3.5, but not 9.3.4  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #11457: The below query crashes 9.3.5, but not 9.3.4  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Wed, Oct 1, 2014 at 2:43 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Accordingly, I propose a patch more like the attached.  This doesn't
> try to change the data structures, but it does take the viewpoint that
> all current callers of find_childrel_appendrelinfo() need to be fixed
> to explicitly consider multiple levels of parent appendrels.
>
This approach is far more solid than my previous stuff and makes the
approach I took really brittle... Looking at your code, I am wondering if
it would not be safer to add some assertions in find_childrel_top_parent
and find_childrel_parents, something like a check on RELOPT_BASEREL for
rel->reloptkind before returning a result. Er, those new functions should
always finishing by scanning a base rel, right?

Btw, this code will need minor adjustments for REL9_2_STABLE and
REL9_3_STABLE. Is a backpatch down to 9.1 to be considered?
--
Michael

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #11457: The below query crashes 9.3.5, but not 9.3.4
Next
From: Tom Lane
Date:
Subject: Re: BUG #11457: The below query crashes 9.3.5, but not 9.3.4