Re: Statistics Import and Export

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, 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-21 22:47:58
Message-ID: 3728741.1740178078@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)de> writes:
> The times get way worse if you dump stats for catalog tables, because there
> some of arrays are regproc and regprocout calls FuncnameGetCandidates(), which
> then ends up iterating over a long cached list... I think that's basically
> O(N^2)?

Can't be that bad. I don't see any proname values that occur more
than 2 dozen times. You can call that a long list if you want,
but it's not scaling with the size of pg_proc.

> Of course that's nothing we should encounter frequently, but ugh.

Yeah, I can't get excited about the cost of that for normal user
dumps. The 002_pg_dump test does run a dump with --schema pg_catalog,
but it's dubious that that test is worth its cycles.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2025-02-21 22:51:01 Re: Amcheck verification of GiST and GIN
Previous Message Andres Freund 2025-02-21 22:37:18 Re: Statistics Import and Export