Re: Extended Statistics set/restore/clear functions.

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, Tomas Vondra <tomas(at)vondra(dot)me>, pgsql-hackers(at)lists(dot)postgresql(dot)org, tgl(at)sss(dot)pgh(dot)pa(dot)us
Subject: Re: Extended Statistics set/restore/clear functions.
Date: 2025-11-17 23:35:00
Message-ID: aRuxJA-2nqFNN6es@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 17, 2025 at 08:53:35PM +0800, jian he wrote:
> segfault:
> SELECT '[{"attributes" : [1,2,3,4,5,67,6,7,8], "ndistinct" : 4}]'::pg_ndistinct;
>
> because src/backend/statistics/mvdistinct.c line: 310, Assert
> Assert((item->nattributes >= 2) && (item->nattributes <= STATS_MAX_DIMENSIONS));

Ahah, good one here. Perhaps we had better switch this assertion to
become an elog() with the import functions in mind, as well. It may
be worth double-checking the other deserialization paths, as well. We
need to be super careful about this stuff for data imports.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2025-11-17 23:40:46 Re: make -C src/test/isolation failure in index-killtuples due to btree_gist
Previous Message Samuel Thibault 2025-11-17 23:31:43 Re: GNU/Hurd portability patches