| From: | Corey Huinker <corey(dot)huinker(at)gmail(dot)com> |
|---|---|
| To: | Michael Paquier <michael(at)paquier(dot)xyz> |
| Cc: | Tomas Vondra <tomas(at)vondra(dot)me>, jian he <jian(dot)universality(at)gmail(dot)com>, 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-10 05:33:40 |
| Message-ID: | CADkLM=eGwDZX9DQ_GouzqjMG7x_kCedBS6br2SciJ3wjwivfZg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
>
> Another thing that may be worth doing is pushing the names of the keys
> and some its the JSON meta-data shaping the object into a new header
> than can be loaded by both the backend and the frontend. It would be
> nice to not hardcode this knowledge in a bunch of places if we finish
> by renaming these attributes.
>
It may not be quite what you wanted, but the attribute names are now static
constants in the new adt c files. It's possible/probable that you wanted
them in some header file, but so far I haven't had to create any new header
files, but that can be done if desired.
Yeah, right. Thanks. The parsing pieces seem like pieces worth their
> own file.
>
That's done in the 0008-0009 patches. If I was starting from scratch, I
would have moved the pre-existing in/out/send/recv functions to their own
files in their own patches before changing the output format, but tacked on
at the end like they are it's easier to see what the changes were, and the
patches will probably get squashed together anyway.
> > The functions in question are needed because the exprs value is itself an
> > array of partly-filled-out pg_attribute tuples, so it's common to those
> two
> > needs, but specific to stats about attributes. Maybe we need an
> > attr_stats_utils.h?
>
> Hmm, maybe. I'd be OK to revisit these structures once we're happy
> with the in/out structures. That would be a good start point before
> working on the SQL functions and the dump/restore bits in more
> details.
>
In addition to the changes detailed above, I fixed a few typos and
incorporated the v8 change.
| Attachment | Content-Type | Size |
|---|---|---|
| v9-0001-Refactor-output-format-of-pg_ndistinct.patch | text/x-patch | 15.5 KB |
| v9-0002-Add-working-input-function-for-pg_ndistinct.patch | text/x-patch | 16.5 KB |
| v9-0003-Refactor-output-format-of-pg_dependencies.patch | text/x-patch | 9.7 KB |
| v9-0004-Add-working-input-function-for-pg_dependencies.patch | text/x-patch | 18.0 KB |
| v9-0005-Expose-attribute-statistics-functions-for-use-in-.patch | text/x-patch | 10.7 KB |
| v9-0006-Add-extended-statistics-support-functions.patch | text/x-patch | 113.1 KB |
| v9-0007-Include-Extended-Statistics-in-pg_dump.patch | text/x-patch | 13.6 KB |
| v9-0008-Make-pg_ndinstinct-a-proper-adt.patch | text/x-patch | 30.5 KB |
| v9-0009-Make-pg_dependencies-a-proper-adt.patch | text/x-patch | 32.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ashutosh Bapat | 2025-11-10 06:13:33 | Re: [Proposal] Expose internal MultiXact member count function for efficient monitoring |
| Previous Message | Peter Smith | 2025-11-10 05:20:32 | Re: Remove unused for_all_tables field from AlterPublicationStmt |