Re: Statistics Import and Export

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, jian he <jian(dot)universality(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-03-06 20:20:16
Message-ID: ezix4wmiodqky7yv7qgc652g4hpzhxsiuqe43mtn6rvmjjfzbd@lbpmx27ps67t
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2025-03-06 14:51:26 -0500, Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
> > On 2025-03-06 13:47:34 -0500, Tom Lane wrote:
> >> ... I wonder if we could just rip out pg_upgrade's support
> >> for DB-level parallelism, which is not terribly pretty anyway, and
> >> simply pass the -j switch straight to pg_dump and pg_restore.
>
> > I don't think that'd work well, right now pg_dump only handles a single
> > database (pg_dumpall doesn't yet support -Fc) *and* pg_dump is still serial
> > for the bulk of the work that pg_upgrade cares about.
> > I think the only parallelism that'd actually happen for pg_upgrade would be
> > dumping of large objects?
>
> Uh ... the entire point here is that we'd be trying to parallelize its
> dumping of stats, no? Most DBs will have enough of those to be
> interesting, I should think.

Well, we added concurrent-pg-dump runs to pg_upgrade for a reason,
presumably. Before stats got dumped, there wasn't any benefit of pg_dump level
parallelism, unless large objects are used. Presumably we validated that there
*is* gain from running pg_dump on multiple databases concurrently.

There are many systems with hundreds of databases, removing all parallelism
for those from pg_upgrade would likely hurt way more than what we can gain
here.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2025-03-06 20:23:34 Re: making EXPLAIN extensible
Previous Message Heikki Linnakangas 2025-03-06 20:18:10 Re: Refactoring postmaster's code to cleanup after child exit