Re: gincostestimate - Mailing list pgsql-hackers

From Tom Lane
Subject Re: gincostestimate
Date
Msg-id 4450.1303428442@sss.pgh.pa.us
Whole thread Raw
In response to gincostestimate  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-hackers
Jeff Janes <jeff.janes@gmail.com> writes:
> The problem is that numEntries in src/backend/utils/adt/selfuncs.c is
> zero and eventually causes a division by zero and a cost estimate of
> nan.
> ...
> I don't know what the solution is.  Simply setting numEntries to 1 if
> ginStats.nEntries zero solves this particular problem, but I don't
> know what other consequences it might have.

Yeah, I think clamping numEntries to a minimum value of 1 is a
reasonable thing to do.  Will fix.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: Formatting Curmudgeons WAS: MMAP Buffers
Next
From: Tom Lane
Date:
Subject: Re: "stored procedures"