]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix size check in statext_dependencies_deserialize()
authorMichael Paquier <michael@paquier.xyz>
Mon, 25 May 2026 05:38:02 +0000 (14:38 +0900)
committerMichael Paquier <michael@paquier.xyz>
Mon, 25 May 2026 05:38:02 +0000 (14:38 +0900)
commit0b8fa5fd37b193c46a03aa5d2838f2c6af973782
tree2cfd842e007372724f2f395a1c5d4161a91f148c
parent01a80f062146af1b17b411c35cb8d992c487fa7c
Fix size check in statext_dependencies_deserialize()

The check for the minimum expected bytea size of a MVDependencies object
was using SizeOfItem() for its calculation.  This macro uses the number
of attributes in a single dependency.

This minimum size calculation should be based on MinSizeOfItems(), that
computes the minimum expected size as the header plus the
minimally-sized number of dependency items.

Oversight in d08c44f7a4ec.

Author: Ilia Evdokimov <ilya.evdokimov@tantorlabs.com>
Discussion: https://postgr.es/m/4b8d299d-2505-4c30-bf80-0f697410db35@tantorlabs.com
Backpatch-through: 14
src/backend/statistics/dependencies.c