Norman Yamada nyamada at millburncorp.com
Thu Sep 1 17:46:30 PDT 2011
As was discussed in a previous thread here, pg_upgrade complains that the following slony tables/columns can't be migrated from 8.3.x to 9.0.x:

> sl_table.tab_relname
> sl_table.tab_nspname
> sl_table.tab_idxname
> sl_sequence.seq_relname
> sl_sequence.seq_nspname
> vactables.relname

I'd still like to use pg_upgrade on a large 8.3.x database that uses slony 2.0.7. if I do the following actions:

1) stop slony;
2) alter table sl_table alter column tab_relname type text, alter column tab_nspname type text, alter column tab_idxname type text;
    alter table sl_sequence alter column seq_relname type text, alter column seq_nspname type text;
    drop type vactables cascade;
    CREATE TYPE vactables AS (
        nspname text,
        relname text
   );
   create function tablestovacuum () … leaving out function body…

3) pg_upgrade

4) start 9.0, do vacuuming analyze, etc…

5) fix slony back:

  alter table sl_table alter column tab_relname type name, alter column tab_nspname type name, alter column tab_idxname type name;
    alter table sl_sequence alter column seq_relname type name, alter column seq_nspname type name;
    drop type vactables cascade;
    CREATE TYPE vactables AS (
        nspname name,
        relname name
   );
   create function tablestovacuum () … leaving out function body…

6) then start slony

Does anyone know if this works? I'm going to try this on a test cluster tomorrow, but wondering if anyone has done this already.

Thanks,

Norman Yamada




More information about the Slony1-general mailing list