Re: Two division by 0 errors in optimizer/plan/planner.c and optimizer/path/costsize.c

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Piotr Stefaniak <postgres(at)piotr-stefaniak(dot)me>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Two division by 0 errors in optimizer/plan/planner.c and optimizer/path/costsize.c
Date: 2016-03-27 22:08:40
Message-ID: 9913.1459116520@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Piotr Stefaniak <postgres(at)piotr-stefaniak(dot)me> writes:
> I'm not saying this is necessarily a bug since the whole function deals
> with floats, but perhaps it's interesting to note that ndistinct can be
> 0 in src/backend/utils/adt/selfuncs.c:estimate_hash_bucketsize:

I think it's basically cosmetic unless you've got a machine that traps
zero divide, but still that's good to fix. Thanks for the report!

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-03-27 22:22:04 Re: Two division by 0 errors in optimizer/plan/planner.c and optimizer/path/costsize.c
Previous Message Andres Freund 2016-03-27 21:52:50 Re: pg_rewind just doesn't fsync *anything*?