From: | Corey Huinker <corey(dot)huinker(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Jeff Davis <pgsql(at)j-davis(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Michael Paquier <michael(at)paquier(dot)xyz>, jian he <jian(dot)universality(at)gmail(dot)com>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Stephen Frost <sfrost(at)snowman(dot)net>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, alvherre(at)alvh(dot)no-ip(dot)org |
Subject: | Re: Statistics Import and Export |
Date: | 2025-02-26 09:25:29 |
Message-ID: | CADkLM=crPjbcyvYEpKwd1hHkaSYgCtiYbN3+Zk3zoj4GrC-g3g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Feb 26, 2025 at 12:05 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Corey Huinker <corey(dot)huinker(at)gmail(dot)com> writes:
> > Just to confirm, we ARE able to assume dense packing of attributes in an
> > index, and thus we can infer the attnum from the position of the attname
> in
> > the aggregated array, and there's no need to do a parallel array_agg of
> > attnums, yes?
>
> Yes, absolutely, there are no dropped columns in indexes. See
> upthread discussion.
>
> We could have avoided two sub-selects for attstattarget too,
> on the same principle: just collect them all and sort it out
> later. That'd risk bloating pg_dump's storage, although maybe
> we could have handled that by doing additional processing
> while inspecting the results of getIndexes' query, so as not
> to store anything in the common case.
>
> regards, tom lane
>
0001 - Add attnum support to attribute_statistics_update
* Basically what Tom posted earlier, minus the pg_set_attribute_stats
stuff, obviously.
0002 - Add attnum support to pg_dump.
* Removed att_stats_arginfo
* Folds appendRelStatsImport and appendAttStatsImport
into dumpRelationStats
Attachment | Content-Type | Size |
---|---|---|
vViaDellaAttnums-0001-Add-ability-to-reference-columns-by.patch | text/x-patch | 7.2 KB |
vViaDellaAttnums-0002-Dump-expression-index-stats-by-attn.patch | text/x-patch | 12.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Maxim Orlov | 2025-02-26 09:33:16 | Re: Spinlock can be released twice in procsignal.c |
Previous Message | Amit Kapila | 2025-02-26 09:05:16 | Re: Enhances pg_createsubscriber documentation for the -d option. |