Re: Possible planner bug/regression introduced in 8.2.5 - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Possible planner bug/regression introduced in 8.2.5
Date
Msg-id 13632.1193259433@sss.pgh.pa.us
Whole thread Raw
In response to Re: Possible planner bug/regression introduced in 8.2.5  (Jakub Ouhrabka <kuba@comgate.cz>)
Responses Re: Possible planner bug/regression introduced in 8.2.5
List pgsql-bugs
Jakub Ouhrabka <kuba@comgate.cz> writes:
> preparing the test case was easier than I expected. It's attached. Fast
> planning on 8.2.4, very slow on 8.2.5.

Hmm.  I think there are two different bugs involved here.  One is fixed
by the attached patch, and it masks the performance problem on your test
case, but I wonder whether it will be enough for your real application.
Can you try this and see if it fixes 8.2.5 for you?

            regards, tom lane

Index: initsplan.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v
retrieving revision 1.123.2.7
diff -c -r1.123.2.7 initsplan.c
*** initsplan.c    4 Oct 2007 20:44:55 -0000    1.123.2.7
--- initsplan.c    24 Oct 2007 20:34:08 -0000
***************
*** 625,630 ****
--- 625,631 ----
           * rel in the lower OJ's min_righthand, not its whole syn_righthand.
           */
          if (bms_overlap(left_rels, otherinfo->syn_righthand) &&
+             bms_overlap(clause_relids, otherinfo->syn_righthand) &&
              !bms_overlap(strict_relids, otherinfo->min_righthand))
          {
              min_lefthand = bms_add_members(min_lefthand,

pgsql-bugs by date:

Previous
From: Jakub Ouhrabka
Date:
Subject: Re: Possible planner bug/regression introduced in 8.2.5
Next
From: "Roger"
Date:
Subject: BUG #3695: Pgsql does not report non existing function