Re: Statistics Import and Export

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(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>, 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-20 15:58:30
Message-ID: CADkLM=fMuVwcxr2aocz4H=LVf2PZsvTNenqEod2PoY1OyCU+kw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 20, 2025 at 3:22 AM jian he <jian(dot)universality(at)gmail(dot)com> wrote:

> On Thu, Jan 16, 2025 at 4:56 AM Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
> wrote:
> >>
> >>
> >>
> >> I do like the idea of a "Statistics for ..." prefix, and I think it's
> >> doable.
> >
> >
> > And that's now implemented.
> >
> >
> >> 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.
> >
> >
> > Tests for pg_dump --no-statistics and pg_dump --schema-only were added.
> Rebased to master as of today.
> >
> > I'm not completely happy with this patch, as I had to comment out one
> check in pg_backup_archiver that seemed necessary, but perhaps another set
> of eyes will set me straight.
> >
> > Attached is just the pg_dump stuff, and only for relation/attribute
> stats. The extended stats and vacuumdb work will be in their own threads
> going forward.
>
> hi
> The current v38 implementation allows statistics to be placed in
> either SECTION_DATA or SECTION_POST_DATA.
> IMHO, moving all statistics to the SECTION_POST_DATA section would
> simplify things.
> Attached is a patch that implements this change, (based on your patch,
> obviously)
>

That is where all statistics were previously. Others felt very strongly
that they should be mixed in to SECTION_DATA and SECTION_POST_DATA.

> * repairDependencyLoop, repairMatViewBoundaryMultiLoop is quite hard

to comprehend.
>

I don't disagree.

>
> * There are many REQ_DATA or REQ_SCHEMA occurrences, for each
> occurrence, we may need to consider REQ_STATS.
>

That is already in the works. Hoping to get that patch out soon.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2025-01-20 16:01:42 Re: Non-text mode for pg_dumpall
Previous Message Benoit Lobréau 2025-01-20 15:53:23 Re: Logging parallel worker draught