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