Re: gincostestimate

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: gincostestimate
Date: 2011-04-21 23:27:22
Message-ID: 4450.1303428442@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jeff Janes <jeff(dot)janes(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2011-04-21 23:27:47 Re: Formatting Curmudgeons WAS: MMAP Buffers
Previous Message Josh Berkus 2011-04-21 23:26:45 Re: best way to test new index?