Re: pg_upgrade bug found!
Josh Berkus <josh@agliodbs.com>
From: Josh Berkus <josh@agliodbs.com>
To: pgsql-hackers@postgresql.org
Date: 2011-04-08T20:30:30Z
Lists: pgsql-hackers
> -- It will not lock any tables but will generate I/O. add: IMPORTANT: Depending on the size and configuration of your database, this script may generate a lot of I/O and degrade database performance. Users should execute this script during a low traffic period and watch the database load. > -- > CREATE TEMPORARY TABLE pg_upgrade_fix AS > SELECT 'VACUUM FREEZE pg_toast.' || c.relname || ';' > FROM pg_class c, pg_namespace n > WHERE c.relnamespace = n.oid AND > n.nspname = 'pg_toast' AND > c.relkind = 't' > ORDER by c.oid; > \copy pg_upgrade_fix TO 'pg_upgrade_tmp.sql'; > \i pg_upgrade_tmp.sql > > A fix will be included in upcoming Postgres releases 8.4.8 and 9.0.4. > These releases will remove the need for the above script by correctly > restoring all TOAST tables in the migrated databases. add: However, users of databases which have been already migrated still need to run the script, even if they upgrade to 9.0.4. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com