Re: Strange query optimization in 7.3.2 - Mailing list pgsql-general

From Tom Lane
Subject Re: Strange query optimization in 7.3.2
Date
Msg-id 15412.1050468054@sss.pgh.pa.us
Whole thread Raw
In response to Re: Strange query optimization in 7.3.2  (Alec Mitchell <apm13@columbia.edu>)
Responses Re: Strange query optimization in 7.3.2  (Alec Mitchell <apm13@columbia.edu>)
List pgsql-general
Alec Mitchell <apm13@columbia.edu> writes:
> I applied the patch to the 7.3.2 sources, but strangely I get a segfault when
> I run initdb using the patched PostgreSQL.  Specifically I get this error:

Sigh ... I do know better than to commit changes without having
regression-tested 'em.  Honest ;-)

Add this patch atop the last:

*** src/backend/utils/adt/selfuncs.c.orig    Tue Apr 15 01:18:12 2003
--- src/backend/utils/adt/selfuncs.c    Wed Apr 16 00:37:58 2003
***************
*** 1610,1617 ****
               * side? It seems that if we assume equal distribution for the
               * other side, we end up with the same answer anyway.
               */
!             double        nullfrac1 = stats1->stanullfrac;
!             double        nullfrac2 = stats2->stanullfrac;

              selec = (1.0 - nullfrac1) * (1.0 - nullfrac2);
              if (nd1 > nd2)
--- 1610,1617 ----
               * side? It seems that if we assume equal distribution for the
               * other side, we end up with the same answer anyway.
               */
!             double        nullfrac1 = stats1 ? stats1->stanullfrac : 0.0;
!             double        nullfrac2 = stats2 ? stats2->stanullfrac : 0.0;

              selec = (1.0 - nullfrac1) * (1.0 - nullfrac2);
              if (nd1 > nd2)



            regards, tom lane


pgsql-general by date:

Previous
From: Robert Treat
Date:
Subject: Re: Postgres Compare
Next
From: Yuriy Rusinov
Date:
Subject: Directory for database cluster