postgresql/src/include/optimizer
Tom Lane 8b965c549d compute_bitmap_pages' loop_count parameter should be double not int.
The value was double in the original implementation of this logic.
Commit da08a6598 pulled it out into a subroutine, but carelessly
declared the parameter as int when it should have been double.
On most platforms, the only ill effect would be to clamp the value
to be not more than INT_MAX, which would seldom be exceeded and
probably wouldn't change the estimates too much anyway.  Nonetheless,
it's wrong and can cause complaints from ubsan.

While here, improve the comments and parameter names.

This is an ABI change in a globally exposed subroutine, so
back-patching would create some risk of breaking extensions.
The value of the fix doesn't seem high enough to warrant taking
that risk, so fix in HEAD only.

Per report from Alexander Lakhin.

Discussion: https://postgr.es/m/f5e15fe1-202d-1936-f47c-f0c69a936b72@gmail.com
2023-12-18 12:46:10 -05:00
..
appendinfo.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
clauses.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
cost.h compute_bitmap_pages' loop_count parameter should be double not int. 2023-12-18 12:46:10 -05:00
geqo.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
geqo_copy.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
geqo_gene.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
geqo_misc.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
geqo_mutation.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
geqo_pool.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
geqo_random.h Remove unnecessary include of <math.h> 2023-12-04 06:35:22 +01:00
geqo_recombination.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
geqo_selection.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
inherit.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
joininfo.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
optimizer.h Ensure we preprocess expressions before checking their volatility. 2023-11-16 10:05:14 -05:00
orclauses.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
paramassign.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
pathnode.h Re-allow FDWs and custom scan providers to replace joins with pseudoconstant quals. 2023-08-15 16:45:00 +09:00
paths.h Add trailing commas to enum definitions 2023-10-26 09:20:54 +02:00
placeholder.h Do assorted mop-up in the planner. 2023-01-30 13:44:36 -05:00
plancat.h Fix calculation of which GENERATED columns need to be updated. 2023-01-05 14:12:17 -05:00
planmain.h Remove useless self-joins 2023-10-25 12:59:16 +03:00
planner.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
prep.h Make Vars be outer-join-aware. 2023-01-30 13:16:20 -05:00
restrictinfo.h Re-allow FDWs and custom scan providers to replace joins with pseudoconstant quals. 2023-08-15 16:45:00 +09:00
subselect.h Allow plan nodes with initPlans to be considered parallel-safe. 2023-07-14 11:41:20 -04:00
tlist.h Update copyright for 2023 2023-01-02 15:00:37 -05:00