Disabling triggers with psql (gforge 7.4 to 8.2 migration)

From: Iñigo Martinez Lasala <imartinez(at)vectorsf(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Disabling triggers with psql (gforge 7.4 to 8.2 migration)
Date: 2010-02-10 09:30:18
Message-ID: 1265794218.3714.12.camel@coyote
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi everybody.

We are migrating an ancient gforge postgres 7.4 database to a less
ancient postgres 8.2 one. We have not upgraded to 8.3 or 8.4 due to
problems with implicit conversion for data types (we should had to
review all sql code and we don't have time enough to do it). It's a
quite large database, with a 45GB dump.

We are facing some problems with this.

First one is tsearch. It has changed from postgres 7.4 to 8.2, but I
think we have solved. We have dumped schema of 7.4, removed all tsearch2
related and launch new tsearch2 from contrib folder in 8.2. We did it
with a previous migration from 7.4 to 8.1 (two years ago) and everything
worked, so we think this has been solved.

Second one is database has lot of stuff and bad ascii codes inside. We
can dump, but we cannot restore due to malformed UTF-8 characters. We
also solved this problem by facing a long conversion process with iconv
(from utf-8 to utf-8) removing bad chars. It appears postgres 7.4 didn't
checked utf-8 chars but 8.1 and 8.2 do it. We have performed a data dump
in plain text to use iconv for fixing this.

Third one, and we haven't been able to fix it, is we cannot restore data
dump via psql due to psql does not have an option to disable triggers.
So, when restoring data, it fails. So... is there any way to disable in
a psql session all triggers same way like with pg_restore
--disable-triggers? Or can we convert plain text dump to be processed
by pg_restore? Perhaps a table by table trigger disabling script?

Thanks in advance.

Of course, if there is an easier way to proceed with a 7.4 to 8.2 gforge
database migration, It would be fantastic if anybody can explain me how
to do it. :-)

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Iñigo Martinez Lasala 2010-02-10 11:34:00 Re: Disabling triggers with psql (gforge 7.4 to 8.2 migration)
Previous Message Bruce Momjian 2010-02-10 01:37:26 Re: pg_migrator from 32bit to 64bit arch -- does it work? caveats?