Re: Numeric multiplication overflow errors

David Rowley <dgrowleyml@gmail.com>

From: David Rowley <dgrowleyml@gmail.com>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-07-04T08:42:48Z
Lists: pgsql-hackers
On Sat, 3 Jul 2021 at 11:04, Dean Rasheed <dean.a.rasheed@gmail.com> wrote:
> Thinking about this more, I think it's best not to risk back-patching.
> It *might* be safe, but it's difficult to really be sure of that. The
> bug itself is pretty unlikely to ever happen in practice, hence the
> lack of prior complaints, and in fact I only found it by an
> examination of the code. So it doesn't seem to be worth the risk.

That seems like good logic to me.  Perhaps we can reconsider that
decision if users complain about it.

David



Commits

  1. Fix numeric_mul() overflow due to too many digits after decimal point.

  2. Prevent numeric overflows in parallel numeric aggregates.