Re: pg_upgrade slowness for databases with many tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stefan Seifert <nine(at)detonation(dot)org>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: pg_upgrade slowness for databases with many tables
Date: 2015-05-24 15:02:54
Message-ID: 26756.1432479774@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Stefan Seifert <nine(at)detonation(dot)org> writes:
> It looks like LockReassignCurrentOwner is taking most of the time.

Yeah, so that is the issue that was alleviated by the patch you were
pointed to.

> What I really wonder though is, why pg_dump does all these queries for single
> objects in the first place? If the target is to create a complete schema dump,
> why not doing a select * from all the relevant pg_* tables and construct the
> big picture in memory? That surely would be much faster?

It's unclear that it would be faster, and it is clear that restructuring
pg_dump like that would be a lotta work.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message digoal 2015-05-25 03:00:07 BUG #13348: PostgreSQL 9.5 sampletable BUG return rows not the same as reltuples*sample factor?
Previous Message kou 2015-05-24 05:49:51 BUG #13343: Yum repository URL for RHEL 6.7 i386 has needless "."