| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | Corey Huinker <corey(dot)huinker(at)gmail(dot)com> |
| Cc: | Artem Gavrilov <artem(dot)gavrilov(at)percona(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [PG19] pg_dump marks extended statistics of pre-v15 partitioned tables as non-inherited |
| Date: | 2026-11-06 23:10:06 |
| Message-ID: | au5eTpS69PBF1c63@paquier.xyz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Nov 06, 2026 at 05:11:07PM -0500, Corey Huinker wrote:
> On Thu, Oct 22, 2026 at 11:12 AM Artem Gavrilov <artem(dot)gavrilov(at)percona(dot)com> wrote:
>> Since c32fb29e979, pg_dump --statistics dumps extended statistics
>> data. For servers older than v15, where pg_stats_ext has no inherited
>> column, the query hard-codes the flag to false. The commit message
>> says "In v14 and older versions, inherited extended statistics are not
>> supported". That is true for the catalog, but not for the data: since
>> 20b9fa308eb, back-patched down to 10.20, 11.15, 12.10, 13.6 and 14.2,
>> these versions build inherited extended stats on partitioned tables.
>
> That's an odd one, indeed.
And clearly a mistake. Good catch.
> My inclination was also to handle it in SQL but there isn't an elegant way
> to do that, so the C route is definitely better.
The patch seems fine per-se. It's sad that it did not make it for
RC2, but let's get it done for the dot-0 release.
It is also worth mentioning 269b532aef55 (introduction of stxdinherit
in pg_statistic_ext_data, affecting v15~), that has removed the
special path that 20b9fa308ebf (affecting ~v14) has added in
do_analyze_rel() for partitioned tables.
--
Michael
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jeff Davis | 2026-11-06 23:17:48 | fix special case during recovery for hot_standby=off |
| Previous Message | Zsolt Parragi | 2026-11-06 22:17:38 | Re: Use correct collation in pg_trgm |