Re: [HACKERS] [sqlsmith] Parallel worker crash on seqscan

2016-11-21 Thread Tom Lane
Robert Haas writes: > Don't sweat it! Your sqlsmith fuzz testing has been extremely valuable. That might be the understatement of the year. I don't know how long it would have taken us to find these things in the field. Thanks! regards, tom lane

Re: [HACKERS] [sqlsmith] Parallel worker crash on seqscan

2016-11-21 Thread Robert Haas
On Mon, Nov 21, 2016 at 5:14 PM, Andreas Seltenreich wrote: > Ashutosh Sharma writes: >>> the following query appears to reliably crash parallel workers on master >>> as of 0832f2d. > >> As suggested, I have tried to reproduce this issue on *0832f2d* commit but >> could not

Re: [HACKERS] [sqlsmith] Parallel worker crash on seqscan

2016-11-21 Thread Andreas Seltenreich
Hi, Ashutosh Sharma writes: >> the following query appears to reliably crash parallel workers on master >> as of 0832f2d. > As suggested, I have tried to reproduce this issue on *0832f2d* commit but > could not reproduce it. as Tom pointed out earlier, I had secretly set parallel_setup_cost

Re: [HACKERS] [sqlsmith] Parallel worker crash on seqscan

2016-11-21 Thread Tom Lane
Robert Haas writes: > On Mon, Nov 21, 2016 at 1:00 PM, Tom Lane wrote: >> Hah: not where I thought it was at all. The problem seems to be down to >> the optimization I put into is_parallel_safe() awhile back to skip testing >> anything if we previously

Re: [HACKERS] [sqlsmith] Parallel worker crash on seqscan

2016-11-21 Thread Robert Haas
On Mon, Nov 21, 2016 at 1:00 PM, Tom Lane wrote: > I wrote: >> Actually, the Gather path *isn't* parameterized. The problem here is >> that we're planning an unflattened subquery, and the only thing that >> is parallel-unsafe is that there is an outer Param in its toplevel

Re: [HACKERS] [sqlsmith] Parallel worker crash on seqscan

2016-11-21 Thread Tom Lane
I wrote: > Actually, the Gather path *isn't* parameterized. The problem here is > that we're planning an unflattened subquery, and the only thing that > is parallel-unsafe is that there is an outer Param in its toplevel tlist, > and we're somehow deciding that we can stick that unsafe tlist into

Re: [HACKERS] [sqlsmith] Parallel worker crash on seqscan

2016-11-21 Thread Tom Lane
Robert Haas writes: > On Mon, Nov 21, 2016 at 12:00 PM, Tom Lane wrote: >> It seems like maybe searching for individual Params is the wrong thing. >> Why are we allowing it to generate a parameterized Gather path at all? >> Given the lack of any way to

Re: [HACKERS] [sqlsmith] Parallel worker crash on seqscan

2016-11-21 Thread Robert Haas
On Mon, Nov 21, 2016 at 12:00 PM, Tom Lane wrote: > Robert Haas writes: >> On Mon, Nov 21, 2016 at 11:43 AM, Tom Lane wrote: >>> so what we've got is a case where a parameter computed by the FunctionScan >>> (in the master) would

Re: [HACKERS] [sqlsmith] Parallel worker crash on seqscan

2016-11-21 Thread Tom Lane
Robert Haas writes: > On Mon, Nov 21, 2016 at 11:43 AM, Tom Lane wrote: >> so what we've got is a case where a parameter computed by the FunctionScan >> (in the master) would need to be passed into the parallel workers at >> runtime. Do we have code

Re: [HACKERS] [sqlsmith] Parallel worker crash on seqscan

2016-11-21 Thread Robert Haas
On Mon, Nov 21, 2016 at 11:43 AM, Tom Lane wrote: > I wrote: >> Like Ashutosh, I can't reproduce the crash, so it's hard to speculate much >> further. > > Ah-hah: now I can. The recipe lacks these important steps: > > set parallel_setup_cost TO 0; > set parallel_tuple_cost TO

Re: [HACKERS] [sqlsmith] Parallel worker crash on seqscan

2016-11-21 Thread Tom Lane
I wrote: > Like Ashutosh, I can't reproduce the crash, so it's hard to speculate much > further. Ah-hah: now I can. The recipe lacks these important steps: set parallel_setup_cost TO 0; set parallel_tuple_cost TO 0; That changes the plan to Limit (cost=0.00..0.06 rows=1 width=64) ->

Re: [HACKERS] [sqlsmith] Parallel worker crash on seqscan

2016-11-21 Thread Tom Lane
Robert Haas writes: > Then again, that might just be a coincidence. The other thing that's > weird here is that the Datum being passed is apparently a NULL > pointer, which neither MakeExpandedObjectReadOnly() nor > MakeExpandedObjectReadOnlyInternal() are prepared to deal

Re: [HACKERS] [sqlsmith] Parallel worker crash on seqscan

2016-11-21 Thread Robert Haas
On Sun, Nov 20, 2016 at 8:53 AM, Andreas Seltenreich wrote: > the following query appears to reliably crash parallel workers on master > as of 0832f2d. > > --8<---cut here---start->8--- > set max_parallel_workers_per_gather to 2; > set

Re: [HACKERS] [sqlsmith] Parallel worker crash on seqscan

2016-11-21 Thread Ashutosh Sharma
Hi, > the following query appears to reliably crash parallel workers on master > as of 0832f2d. > > --8<---cut here---start->8--- > set max_parallel_workers_per_gather to 2; > set force_parallel_mode to 1; > > select subq.context from pg_settings, > lateral