Re: Extended Statistics set/restore/clear functions.

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, 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-22 08:26:19
Message-ID: CADkLM=crdyK3w7-EDEdDfXHGidxm2ms+bQYNFOZUD4eOLuLXEQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
>
> wondering, should we check the value of "degree" is between 0 to 1?
>

I'm open to it, but there was significant pushback to having tight validity
checks on other stats types.

The more things that we make errors, the more chances we have to breaking a
dump/restore. Granted, such values should never happen, but odd things do
happen.

>
> IF the value of ""dependency"
> does not meet
> ``(if (parse->dependency == 0 || parse->dependency <
> (0-STATS_MAX_DIMENSIONS))``
> then error out.
> see the attached patch.
>

Good catch.

Incorporated these patches as well as Yuefei's feedback especially around
memory management.

I added a comment debating the feasibility of testing for subsets of
attribute sets in pg_dependencies. Basically, I think we can't have the
test at all, but I haven't removed it just yet pending consensus.

Attachment Content-Type Size
v17-0001-Add-working-input-function-for-pg_ndistinct.patch text/x-patch 57.2 KB
v17-0002-Add-working-input-function-for-pg_dependencies.patch text/x-patch 68.5 KB
v17-0003-Expose-attribute-statistics-functions-for-use-in.patch text/x-patch 10.7 KB
v17-0004-Add-extended-statistics-support-functions.patch text/x-patch 166.8 KB
v17-0005-Include-Extended-Statistics-in-pg_dump.patch text/x-patch 13.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2025-11-22 08:37:31 Re: headerscheck ccache support
Previous Message Nazir Bilal Yavuz 2025-11-22 08:09:30 Re: meson and check-tests