Re: Extended Statistics set/restore/clear functions. - Mailing list pgsql-hackers

From Corey Huinker
Subject Re: Extended Statistics set/restore/clear functions.
Date
Msg-id CADkLM=ctsYGwHin8TtU2dmbLmssNCyAcmStfx1yKbMKrUSMNCg@mail.gmail.com
Whole thread Raw
In response to Re: Extended Statistics set/restore/clear functions.  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Mon, Nov 17, 2025 at 6:35 PM Michael Paquier <michael@paquier.xyz> wrote:
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.

Yeah, I liked that one too, and I can act on that while we're debating how tightly to turn the screws on combinatorics.

 

pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: Row pattern recognition
Next
From: "cca5507"
Date:
Subject: Re: minor improvement in snapbuild: use existing interface and removefake code