Re: Fix incorrect size check in statext_dependencies_deserialize

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Ilia Evdokimov <ilya(dot)evdokimov(at)tantorlabs(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix incorrect size check in statext_dependencies_deserialize
Date: 2026-05-20 04:49:03
Message-ID: ag09P6y3nG1OnDhE@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Xuneng Zhou 2026-05-20 05:18:07 Re: Implement waiting for wal lsn replay: reloaded
Previous Message Michael Paquier 2026-05-20 04:10:33 Re: Fix pg_stat_wal_receiver to show CONNECTING status