Re: Statistics Import and Export

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, jian he <jian(dot)universality(at)gmail(dot)com>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-01-07 20:14:15
Message-ID: d8df5339cab25b5720667beaaed8a8bb8e11578c.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2025-01-07 at 01:18 -0500, Corey Huinker wrote:
> Attached is the latest (and probably last) unified patchset before
> parts get spun off into their own threads.

In this thread I'm only looking at 0001. Please start a new thread for
vacuumdb and extended stats changes.

> 0001 - This is the unified changes to pg_dump, pg_restore,
> pg_dumpall, and pg_upgrade.
>
> It incorporates most of what Jeff changed when he unified v36j, with
> typo fixes spotted by Bruce. There was interest in splitting
> STATISTICS DATA into RELATION STATISTICS DATA and ATTRIBUTE
> STATISTICS DATA.

I think we should just stick with "STATISTICS DATA".

> There was also interest in changing the prefix for STATISTICS DATA.
> However, the only special case for prefixes currently relies on an
> isData flag. Since there is no isStatistics flag, we would either
> have to create one, or do strcmps on te->description looking for
> "STATISTICS DATA". It's do-able, but I'm not sure it's worth it.

I do like the idea of a "Statistics for ..." prefix, and I think it's
doable.

The caller needs some knowledge about that anyway, to correctly output
the statistics dump when the schema is not requested. Tests should
cover those cases, too.

Regards,
Jeff Davis

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-01-07 20:14:36 Re: Moving the vacuum GUCs' docs out of the Client Connection Defaults section
Previous Message Heikki Linnakangas 2025-01-07 20:09:56 Re: AIO v2.2