函数estimatePartitionSize内部变量curpages判断条件不准确

This commit is contained in:
lilong
2023-01-05 15:10:57 +08:00
parent ee3b7bcb4c
commit 0dda70971c

View File

@ -1971,7 +1971,7 @@ void estimatePartitionSize(
* pages added since the last VACUUM are most likely not marked
* all-visible. But costsize.c wants it converted to a fraction.
*/
if (partitionallvisible == 0 || curpages <= 0) {
if (partitionallvisible == 0 || curpages == 0) {
*allvisfrac = 0;
} else if ((double)partitionallvisible >= curpages) {
*allvisfrac = 1;