aboutsummaryrefslogtreecommitdiff
path: root/src/include/postgres_ext.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-12-18 12:46:07 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2023-12-18 12:46:10 -0500
commit8b965c549dc8753be8a38c4a1b9fabdb535a4338 (patch)
tree19413713d999928124eca96353a9dbbd2ff84f6e /src/include/postgres_ext.h
parent64b1fb5f03266f0ef4eef3ad2b7d97170bb05b78 (diff)
downloadpostgresql-8b965c549dc8753be8a38c4a1b9fabdb535a4338.tar.gz
postgresql-8b965c549dc8753be8a38c4a1b9fabdb535a4338.zip
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
Diffstat (limited to 'src/include/postgres_ext.h')
0 files changed, 0 insertions, 0 deletions