diff options
author | Fujii Masao <fujii@postgresql.org> | 2021-04-02 17:27:31 +0900 |
---|---|---|
committer | Fujii Masao <fujii@postgresql.org> | 2021-04-02 17:27:31 +0900 |
commit | 96bdb7e19de80a0c9521c5696455bca2a685c919 (patch) | |
tree | 28ff43ecfd49169da563edd98ca6f34cbba7e303 /src/backend/tcop/postgres.c | |
parent | 6fb66c268df2de1112cac3cf0a6cf0a8b96ceaf0 (diff) | |
download | postgresql-96bdb7e19de80a0c9521c5696455bca2a685c919.tar.gz postgresql-96bdb7e19de80a0c9521c5696455bca2a685c919.zip |
Fix pgstat_report_replslot() to use proper data types for its arguments.
The caller of pgstat_report_replslot() passes int64 values to the function.
Also the function stores those values in PgStat_Counter (i.e., int64) fields
of PgStat_MsgReplSlot struct. But previously the function used "int" as
the data types of some arguments for those values, which could lead to
the overflow of values.
To avoid this risk, this commit fixes pgstat_report_replslot() to use
PgStat_Counter type for the arguments. Since they are the statistics counters,
PgStat_Counter, the data type used for counters, is used for them
instead of int64.
Reported-by: Vignesh C
Author: Vignesh C
Reviewed-by: Jeevan Ladhe, Fujii Masao
Discussion: https://postgr.es/m/CALDaNm080OpG=ZwOb0i8EyChH5SyHAMFWJCKaKTXmrfvJLbgaA@mail.gmail.com
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions