Re: [HACKERS] [sqlsmith] Crash in apply_projection_to_path

2016-04-30 Thread Tom Lane
Amit Kapila writes: > On Fri, Apr 29, 2016 at 7:33 PM, Tom Lane wrote: >> make_join_rel is certainly not far enough down the call stack to solve >> this problem. It can, and typically will, be invoked multiple times >> for the same target join relation. >> >> One possible answer is to do it in

Re: [HACKERS] [sqlsmith] Crash in apply_projection_to_path

2016-04-29 Thread Amit Kapila
On Fri, Apr 29, 2016 at 7:33 PM, Tom Lane wrote: > > Amit Kapila writes: > >> On Thu, Apr 28, 2016 at 10:06 PM, Tom Lane wrote: > >>> I'd be inclined to think that it's silly to build GatherPaths in advance > >>> of having finalized the list of partial paths for a rel. > > > What's happening her

Re: [HACKERS] [sqlsmith] Crash in apply_projection_to_path

2016-04-29 Thread Tom Lane
Amit Kapila writes: >> On Thu, Apr 28, 2016 at 10:06 PM, Tom Lane wrote: >>> I'd be inclined to think that it's silly to build GatherPaths in advance >>> of having finalized the list of partial paths for a rel. > What's happening here is that to form joinrel, we need to call > add_paths_to_joinr

Re: [HACKERS] [sqlsmith] Crash in apply_projection_to_path

2016-04-29 Thread Amit Kapila
On Fri, Apr 29, 2016 at 8:07 AM, Robert Haas wrote: > > On Thu, Apr 28, 2016 at 10:06 PM, Tom Lane wrote: > > Andreas Seltenreich writes: > >> the following query against the regression database crashes master as of > >> 23b09e15. > > > >> select 1 from depth0 inner join depth1 on (depth0.c = de

Re: [HACKERS] [sqlsmith] Crash in apply_projection_to_path

2016-04-28 Thread Robert Haas
On Thu, Apr 28, 2016 at 10:06 PM, Tom Lane wrote: > Andreas Seltenreich writes: >> the following query against the regression database crashes master as of >> 23b09e15. > >> select 1 from depth0 inner join depth1 on (depth0.c = depth1.c) >> where depth0.c @@ depth1.c limit 1; > > What's

Re: [HACKERS] [sqlsmith] Crash in apply_projection_to_path

2016-04-28 Thread Tom Lane
Andreas Seltenreich writes: > the following query against the regression database crashes master as of > 23b09e15. > select 1 from depth0 inner join depth1 on (depth0.c = depth1.c) > where depth0.c @@ depth1.c limit 1; What's going on here is that add_partial_path is recycling a now-dom

[HACKERS] [sqlsmith] Crash in apply_projection_to_path

2016-04-28 Thread Andreas Seltenreich
Hi, the following query against the regression database crashes master as of 23b09e15. select 1 from depth0 inner join depth1 on (depth0.c = depth1.c) where depth0.c @@ depth1.c limit 1; regards, Andreas Program terminated with signal SIGSEGV, Segmentation fault. #0 create_projection_