Re: pg_upgrade bug found! - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: pg_upgrade bug found!
Date
Msg-id 4D9F7066.1030601@agliodbs.com
Whole thread Raw
In response to Re: pg_upgrade bug found!  (Bruce Momjian <bruce@momjian.us>)
Responses Re: pg_upgrade bug found!  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: pg_upgrade bug found!
Next
From: Noah Misch
Date:
Subject: Re: Typed-tables patch broke pg_upgrade