Use mul_size when multiplying by the number of parallel workers.

Robert Haas <rhaas@postgresql.org>

Commit: 06bd458cb812623c3f1fdd55216c4c08b06a8447
Author: Robert Haas <rhaas@postgresql.org>
Date: 2016-05-06T18:32:58Z
Releases: 9.6.0
Use mul_size when multiplying by the number of parallel workers.

That way, if the result overflows size_t, you'll get an error instead
of undefined behavior, which seems like a plus.  This also has the
effect of casting the number of workers from int to Size, which is
better because it's harder to overflow int than size_t.

Dilip Kumar reported this issue and provided a patch upon which this
patch is based, but his version did use mul_size.

Files