pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #14111: After minor upgrade (9.2.6 -> 9.2.16): ERROR: failed to build any 2-way joins
4+ messages / 3 participants
[nested] [flat]

* BUG #14111: After minor upgrade (9.2.6 -> 9.2.16): ERROR: failed to build any 2-way joins
@ 2016-04-25 12:03  bgrundmann@janestreet.com
  0 siblings, 1 reply; 4+ messages in thread

From: bgrundmann@janestreet.com @ 2016-04-25 12:03 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      14111
Logged by:          Benedikt Grundmann
Email address:      bgrundmann@janestreet.com
PostgreSQL version: 9.2.16
Operating system:   Linux
Description:        

From all I know so far we have a query that used to work last week and after
upgrading from 9.2.6 to 9.2.16 this weekend, we get 

ERROR: failed to build any 2-way joins

when trying to plan the same query (that is either run the query or even
just explain it).  The query is this:

explain                                                                     
                                          
SELECT                                                                      
                                          
  COALESCE(x11.x13, x10.x13) AS x13,                                        
                                          
  SUM(ABS(COALESCE(x11.x14,0) - COALESCE(x10.x14,0))) AS x15,               
                                          
  SUM(COALESCE(x11.x14,0) - COALESCE(x10.x14,0)) AS x16,                    
                                          
  SUM(ABS((COALESCE(x11.x14,0) - COALESCE(x10.x14,0)) * COALESCE(x2.x17,0)))
AS x18,                                   
  SUM((COALESCE(x11.x14,0) - COALESCE(x10.x14,0)) * COALESCE(x2.x17,0)) AS
x25,                                        
  COALESCE(SUM(ABS((COALESCE(x11.x14,0) - COALESCE(x10.x14,0)) *
COALESCE(x2.x17,0)))/(x4.x12 * x5.divisor),0)         
  AS gross_pct,                                                             
                                          
  COALESCE(SUM((COALESCE(x11.x14,0) - COALESCE(x10.x14,0)) *
COALESCE(x2.x17,0))/(x4.x12 * x5.divisor),0) AS net_pct   
FROM (                                                                      
                                          
  SELECT x3.x22, x3.x13, x3.x23, x3.x14 FROM x3 WHERE x3.x22 = '4/25/2016'  
                                          
) x11 FULL JOIN (                                                           
                                          
  SELECT x3.x22, x3.x13, x3.x23, x3.x14 FROM x3 WHERE x3.x22 = '4/22/2016'  
                                          
) x10 ON x11.x13 = x10.x13 AND x11.x23 = x10.x23                            
                                          
LEFT JOIN x2 ON x2.x22 = (( SELECT x20('4/25/2016', (-1)) AS x20)) AND
x2.x24 = COALESCE(x11.x23,x10.x23)              
LEFT JOIN x4 ON ('4/25/2016' = x4.x22 AND COALESCE(x11.x13,x10.x13) =
x4.x13)                                          
LEFT JOIN x5 ON ('4/25/2016' = x5.x22 AND COALESCE(x11.x13,x10.x13) =
x5.x13)                                          
WHERE (COALESCE(x11.x14, 0) - COALESCE(x10.x14, 0)) <> 0                    
                                          
GROUP BY COALESCE(x11.x13, x10.x13), (x4.x12 * x5.divisor)                  
                                          
ORDER BY COALESCE(SUM(ABS((COALESCE(x11.x14,0) - COALESCE(x10.x14,0)) *
COALESCE(x2.x17,0)))/(x4.x12 * x5.divisor),0)  
DESC;  



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #14111: After minor upgrade (9.2.6 -> 9.2.16): ERROR: failed to build any 2-way joins
@ 2016-04-25 16:14  David G. Johnston <david.g.johnston@gmail.com>
  parent: bgrundmann@janestreet.com
  0 siblings, 1 reply; 4+ messages in thread

From: David G. Johnston @ 2016-04-25 16:14 UTC (permalink / raw)
  To: bgrundmann@janestreet.com; +Cc: pgsql-bugs

On Mon, Apr 25, 2016 at 5:03 AM, <bgrundmann@janestreet.com> wrote:

> The following bug has been logged on the website:
>
> Bug reference:      14111
> Logged by:          Benedikt Grundmann
> Email address:      bgrundmann@janestreet.com
> PostgreSQL version: 9.2.16
> Operating system:   Linux
> Description:
>
> >From all I know so far we have a query that used to work last week and
> after
> upgrading from 9.2.6 to 9.2.16 this weekend, we get
>
> ERROR: failed to build any 2-way joins
>
> when trying to plan the same query (that is either run the query or even
> just explain it).  The query is this:
>
>
​This sounds like the same as bug #
 14105

​
http://www.postgresql.org/message-id/20160420194758.22924.80319@wrigleys.postgresql.org
​

​That one has been corrected and will go out in the next release.

http://git.postgresql.org/pg/commitdiff/d9742ac4636ec847f9fd54c9d690da
7402319063

Someone with source compilation can hopefully confirm that your specific
example is indeed fixed.

The combinations of left and full join lead me to suspect that indeed these
are caused by the same bug.

David J.
​

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #14111: After minor upgrade (9.2.6 -> 9.2.16): ERROR: failed to build any 2-way joins
@ 2016-04-26 06:53  Benedikt Grundmann <bgrundmann@janestreet.com>
  parent: David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Benedikt Grundmann @ 2016-04-26 06:53 UTC (permalink / raw)
  To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-bugs

thanks.  Any idea when that release will go out?

On Mon, Apr 25, 2016 at 5:14 PM, David G. Johnston <
david.g.johnston@gmail.com> wrote:

> On Mon, Apr 25, 2016 at 5:03 AM, <bgrundmann@janestreet.com> wrote:
>
>> The following bug has been logged on the website:
>>
>> Bug reference:      14111
>> Logged by:          Benedikt Grundmann
>> Email address:      bgrundmann@janestreet.com
>> PostgreSQL version: 9.2.16
>> Operating system:   Linux
>> Description:
>>
>> >From all I know so far we have a query that used to work last week and
>> after
>> upgrading from 9.2.6 to 9.2.16 this weekend, we get
>>
>> ERROR: failed to build any 2-way joins
>>
>> when trying to plan the same query (that is either run the query or even
>> just explain it).  The query is this:
>>
>>
> ​This sounds like the same as bug #
>  14105
>
> ​
> http://www.postgresql.org/message-id/20160420194758.22924.80319@wrigleys.postgresql.org
> ​
>
> ​That one has been corrected and will go out in the next release.
>
> http://git.postgresql.org/pg/commitdiff/d9742ac4636ec847f9fd54c9d690da
> 7402319063
>
> Someone with source compilation can hopefully confirm that your specific
> example is indeed fixed.
>
> The combinations of left and full join lead me to suspect that indeed
> these are caused by the same bug.
>
> David J.
> ​
>
>
>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #14111: After minor upgrade (9.2.6 -> 9.2.16): ERROR: failed to build any 2-way joins
@ 2016-04-26 07:16  David G. Johnston <david.g.johnston@gmail.com>
  parent: Benedikt Grundmann <bgrundmann@janestreet.com>
  0 siblings, 0 replies; 4+ messages in thread

From: David G. Johnston @ 2016-04-26 07:16 UTC (permalink / raw)
  To: Benedikt Grundmann <bgrundmann@janestreet.com>; +Cc: pgsql-bugs

On Mon, Apr 25, 2016 at 11:53 PM, Benedikt Grundmann <
bgrundmann@janestreet.com> wrote:

> thanks.  Any idea when that release will go out?
>

​9.6 Beta 1 and the next batch of minor releases are being targeted for May
12th, 2016

http://www.postgresql.org/developer/roadmap/

The beta info is from other recent list threads.

David J.
​

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2016-04-26 07:16 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-04-25 12:03 BUG #14111: After minor upgrade (9.2.6 -> 9.2.16): ERROR: failed to build any 2-way joins bgrundmann@janestreet.com
2016-04-25 16:14 ` David G. Johnston <david.g.johnston@gmail.com>
2016-04-26 06:53   ` Benedikt Grundmann <bgrundmann@janestreet.com>
2016-04-26 07:16     ` David G. Johnston <david.g.johnston@gmail.com>

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