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-13 07:32:17
Message-ID: CADkLM=fky861BrifcuWc0CbWfo3yMbRB+m1jG4qqXG_3hnqdtA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 13, 2025 at 2:02 AM jian he <jian(dot)universality(at)gmail(dot)com> wrote:

> hi.
>
> v12-0001 and v12-0002 overall look good to me.
>
> if (dependency->nattributes <= 1)
> elog(ERROR, "invalid zero-length nattributes array in
> MVDependencies");
> This is an unlikely-to-happen error message, but still, “nattributes”
> seems confusing?
>

Agreed the error message should be changed if it's kept at all. That error
may never occur now that we test for empty arrays in the array close event
handler. So maybe this becomes a plain assert().

> similarly, in doc/src/sgml/perform.sgml, I think the query should be:
>
> SELECT stxkeys AS k, jsonb_pretty(stxdndistinct::text::jsonb) AS nd
> FROM pg_statistic_ext join pg_statistic_ext_data on (oid = stxoid)
> WHERE stxname = 'stts2' \gx
>

The example almost certainly predates \gx, so that's a good suggestion.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2025-11-13 08:13:30 Re: Suggestion to add --continue-client-on-abort option to pgbench
Previous Message Joel Jacobson 2025-11-13 07:13:28 Re: Optimize LISTEN/NOTIFY