Re: Fix incorrect size check in statext_dependencies_deserialize

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Ilia Evdokimov <ilya.evdokimov@tantorlabs.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-05-20T04:49:03Z
Lists: pgsql-hackers
On Tue, May 19, 2026 at 05:29:56PM +0300, Ilia Evdokimov wrote:
> It should use `MinSizeOfItems` instead, which correctly computes the minimum
> expected size as the header plus `ndeps` minimally-sized dependency items.
> 
> Notably, the similar function for ndistinct extended statistics
> `statext_ndistinct_deserialize()` already uses `MinSizeOfItems` correctly,
> which suggests this is a typo rather than an intentional choice.

Good catch, nice!  This looks like a typo from d08c44f7a4ec to me,
where MinSizeOfItems sticks to the definition we have for MVDependency
in statistics.h.

Will fix.
--
Michael