Re: Hash join explain is broken

2019-08-02 Thread Andres Freund
Hi, On 2019-07-02 10:50:02 -0400, Tom Lane wrote: > I wrote: > > Andres Freund writes: > >> Tom, any comments? Otherwise I'll go ahead, and commit after a round or > >> two of polishing. > > > Sorry for not getting to this sooner --- I'll try to look tomorrow. > > I took a look, and I think thi

Re: Hash join explain is broken

2019-07-02 Thread Tom Lane
I wrote: > Andres Freund writes: >> Tom, any comments? Otherwise I'll go ahead, and commit after a round or >> two of polishing. > Sorry for not getting to this sooner --- I'll try to look tomorrow. I took a look, and I think this is going in the right direction. We definitely need a test case c

Re: Hash join explain is broken

2019-07-01 Thread Tom Lane
Andres Freund writes: > Tom, any comments? Otherwise I'll go ahead, and commit after a round or > two of polishing. Sorry for not getting to this sooner --- I'll try to look tomorrow. regards, tom lane

Re: Hash join explain is broken

2019-07-01 Thread Andres Freund
Hi, On 2019-06-18 00:00:28 -0700, Andres Freund wrote: > On 2019-06-13 16:23:34 -0700, Andres Freund wrote: > > On June 13, 2019 3:38:47 PM PDT, Tom Lane wrote: > > >Andres Freund writes: > > >> I am too tired to look further into this. I suspect the only reason > > >we > > >> didn't previously

Re: Hash join explain is broken

2019-06-18 Thread Andres Freund
Hi, On 2019-06-13 16:23:34 -0700, Andres Freund wrote: > On June 13, 2019 3:38:47 PM PDT, Tom Lane wrote: > >Andres Freund writes: > >> I am too tired to look further into this. I suspect the only reason > >we > >> didn't previously run into trouble with the executor stashing > >hashkeys > >> ma

Re: Hash join explain is broken

2019-06-13 Thread Andres Freund
Hi, On June 13, 2019 3:38:47 PM PDT, Tom Lane wrote: >Andres Freund writes: >> I am too tired to look further into this. I suspect the only reason >we >> didn't previously run into trouble with the executor stashing >hashkeys >> manually at a different tree level with: >> ((HashState *) innerPla

Re: Hash join explain is broken

2019-06-13 Thread Tom Lane
Andres Freund writes: > I am too tired to look further into this. I suspect the only reason we > didn't previously run into trouble with the executor stashing hashkeys > manually at a different tree level with: > ((HashState *) innerPlanState(hjstate))->hashkeys > is that hashkeys itself isn't pri

Re: Hash join explain is broken

2019-06-11 Thread Andres Freund
Hi, On 2019-06-11 00:45:57 -0700, Andres Freund wrote: > On 2019-06-10 21:28:12 +0300, Alexander Korotkov wrote: > > After 5f32b29c explain of Hash Join sometimes triggers an error. > > > > Simple reproduction case is below. > > Thanks for finding. I've created an open issue for now. I am too ti

Re: Hash join explain is broken

2019-06-11 Thread Andres Freund
Hi, On 2019-06-10 21:28:12 +0300, Alexander Korotkov wrote: > After 5f32b29c explain of Hash Join sometimes triggers an error. > > Simple reproduction case is below. Thanks for finding. I've created an open issue for now. Greetings, Andres Freund

Hash join explain is broken

2019-06-10 Thread Alexander Korotkov
Hi! After 5f32b29c explain of Hash Join sometimes triggers an error. Simple reproduction case is below. # create table t (x int); CREATE TABLE # set enable_sort = off; SET # explain select * from t a, t b where a.x = (select 1 where b.x = 1); ERROR: bogus varno: 65000 Before 5f32b29c the same