Re: BUG #12862: Bug in intarray extension operators (using generic selectivity estimators instead of array oriented)

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: maxim(dot)boguk(at)postgresql-consulting(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #12862: Bug in intarray extension operators (using generic selectivity estimators instead of array oriented)
Date: 2015-03-17 19:15:31
Message-ID: 20150317191531.GE10492@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Mar 13, 2015 at 02:54:56PM +0000, maxim(dot)boguk(at)postgresql-consulting(dot)com wrote:
> As you could see after installing the intarray extension PostgreSQL started
> use a general selectivity estimator. Estimated rows=10000 before create
> extension and estimated rows=10 after, 10000 - correct one.
>
> Problem that custom (redefined) intarray && @> <@ operators are defined with
> contsel/contjoinsel instead of arraycontsel/arraycontjoinsel.
>
> However, simple change extension/intarray--1.0.sql with correct CREATE
> OPERATOR doesn't fix issue:
> test=# explain analyze select * from test where f1 && array[100];
> ERROR: arraycontsel called for unrecognized operator 814221170
>
> I cannot find any quick fix for this issue because OID of custom && operator
> isn't fixed, so no simple change of arraycontsel/arraycontjoinsel possible.
>
> An issue exists in any version since introducing
> arraycontsel/arraycontjoinsel in 9.2 up to HEAD.

Yeah, I am not sure what to recommend here as our custom type optimizer
statistics are not as good as the built-in ones. Did you try running
ANALYZE?

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2015-03-17 19:45:45 Re: BUG #12872: Inconsistent processing of interval values
Previous Message Elena Fernandez Carmona 2015-03-17 15:52:50 Re: compatibilty postgres 9.2 RHEL 6.4