Speeding up pg_upgrade

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Speeding up pg_upgrade
Date: 2011-04-26 00:22:35
Message-ID: 201104260022.p3Q0MZ805168@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I have just applied a patch to minorly improve performance of pg_upgrade.

Below is a pg_upgrade test run from 9.0 to 9.1 with the 'regression'
database loaded; the numbers at the start of the line indicate the
number of seconds from the previous line being output.

Does anyone see any way to speed up pg_upgrade? I don't see it:

---------------------------------------------------------------------------

0|Checking old data directory (/u/pgsql.old/data) ok
0|Checking old bin directory (/u/pgsql.old/bin) ok
0|Checking new data directory (/u/pgsql/data) ok
0|Checking new bin directory (/u/pgsql/bin) ok
start old
6|Checking for reg* system oid user data types ok
0|Checking for /contrib/isn with bigint-passing mismatch ok
11|Creating catalog dump ok
stop old
start new
7|Checking for presence of required libraries ok
0|
0|| If pg_upgrade fails after this point, you must
0|| re-initdb the new cluster before continuing.
0|| You will also need to remove the ".old" suffix
0|| from /u/pgsql.old/data/global/pg_control.old.
0|
0|Performing Upgrade
0|------------------
0|Adding ".old" suffix to old global/pg_control ok
4|Analyzing all rows in the new cluster ok
1|Freezing all rows on the new cluster ok
stop new
2|Deleting new commit clogs ok
0|Copying old commit clogs to new server ok
2|Setting next transaction id for new cluster ok
1|Resetting WAL archives ok
start new
4|Setting frozenxid counters in new cluster ok
5|Creating databases in the new cluster ok
0|Adding support functions to new cluster ok
9|Restoring database schema to new cluster ok
1|Removing support functions from new cluster ok
stop new
2|Restoring user relation files
1|Setting next oid for new cluster ok
0|Creating script to delete old cluster ok
0|
0|Upgrade complete
0|----------------
0|| Optimizer statistics are not transferred by pg_upgrade
0|| so consider running:
0|| vacuumdb --all --analyze-only
0|| on the newly-upgraded cluster.
0|
0|| Running this script will delete the old cluster's data files:
0|| /usr/var/local/pgdev/pgfoundry/pg_migrator/pg_migrator/delete_old_cluster.sh

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2011-04-26 00:24:00 Re: Improving the memory allocator
Previous Message Tom Lane 2011-04-26 00:22:34 Re: Improving the memory allocator