pgsql: Fix confusion about data type of pg_class.relpages and relallvis
pgsql: Fix confusion about data type of pg_class.relpages and relallvis
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Fix confusion about data type of pg_class.relpages and relallvisible. Although they're exposed as int4 in pg_class, relpages and relallvisible are really of type BlockNumber, that is uint32. Correct type puns in relation_statistics_update() and remove inappropriate range-checks. The type puns are only cosmetic issues, but the range checks would cause failures with huge relations. Reported-by: Tom Lane Author: Corey Huinker Reviewed-by: Tom Lane Discussion: https://postgr.es/m/614341.1740269035@sss.pgh.pa.us Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/9de2cc455eb9c60dda979c32985df967522a8ab2 Modified Files -------------- src/backend/statistics/relation_stats.c | 53 ++++++++------------------------- 1 file changed, 13 insertions(+), 40 deletions(-)