Обсуждение: pgsql: Assert that cutoffs are provided if freezing will be attempted

Поиск
Список
Период
Сортировка

pgsql: Assert that cutoffs are provided if freezing will be attempted

От
Melanie Plageman
Дата:
Assert that cutoffs are provided if freezing will be attempted

heap_page_prune_and_freeze() requires the caller to initialize
PruneFreezeParams->cutoffs so that the function can correctly evaluate
whether tuples should be frozen. This requirement previously existed
only in comments and was easy to miss, especially after “cutoffs” was
converted from a direct function parameter to a field of the newly
introduced PruneFreezeParams struct (added in 1937ed70621). Adding an
assert makes this requirement explicit and harder to violate.

Also, fix a minor typo while we're at it.

Author: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Melanie Plageman <melanieplageman@gmail.com>
Discussion: https://postgr.es/m/0AC177F5-5E26-45EE-B273-357C51212AC5%40gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/cd38b7e77315c729ea1e52ca7b8bb0d7c20d2a3b

Modified Files
--------------
src/backend/access/heap/pruneheap.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)