From: | Laurent ROCHE <laurent_roche(at)yahoo(dot)com> |
---|---|
To: | Richard Huxton <dev(at)archonet(dot)com>, "(dot)ep" <erick(dot)papa(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re : Importing *huge* mysql database into pgsql |
Date: | 2007-03-06 17:02:47 |
Message-ID: | 181280.80130.qm@web34410.mail.mud.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
In addtion to mysql2pgsql (which we used and worked fine for us), you might want to have a look DDL-Utils
http://db.apache.org/ddlutils/
It can convert a schema and data from one RDBMs to another. It is supposed to work from MySQL to PG, although I haven't used it this way (I use it from PG to Derby).
The DDL-Utils mailing list is really reactive, so I am sure they will give you a hand if you get stuck (if you were choosing to go down that route).
Have fun,
L(at)u
The Computing Froggy
----- Message d'origine ----
De : Richard Huxton <dev(at)archonet(dot)com>
À : .ep <erick(dot)papa(at)gmail(dot)com>
Cc : pgsql-general(at)postgresql(dot)org
Envoyé le : Mardi, 6 Mars 2007, 15h54mn 02s
Objet : Re: [GENERAL] Importing *huge* mysql database into pgsql
.ep wrote:
> Hello,
>
> I would like to convert a mysql database with 5 million records and
> growing, to a pgsql database.
And where's the huge database?
> All the stuff I have come across on the net has things like
> "mysqldump" and "psql -f", which sounds like I will be sitting forever
> getting this to work.
Well, there's not much of an alternative to exporting from one system
and importing to another. If you do find a better way, patent it!
This is probably a sensible place to start for converting schemas:
http://pgfoundry.org/projects/mysql2pgsql
Then, you'll face two problems:
1. Invalid data in your mysql dump (e.g. dates like 0000-00-00)
2. Mysql-specific usage in your application
Then you might want to examine any performance issues (where your
application code has been tuned to work well with MySQL but not
necessarily PG).
Shouldn't be more than a day's work, maybe just 1/2 a day. I like to
build these things up as sets of perl scripts. That way when I notice
"one more thing" I can re-run my scripts from wherever the problem was.
Oh - if you come up with any improvements in mysql2pgsql then let the
developers know - I'm sure they'll be interested.
Good luck!
--
Richard Huxton
Archonet Ltd
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
___________________________________________________________________________
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses
http://fr.answers.yahoo.com
From | Date | Subject | |
---|---|---|---|
Next Message | Harald Fuchs | 2007-03-06 17:34:15 | Re: Importing *huge* mysql database into pgsql |
Previous Message | altudela | 2007-03-06 17:01:55 | "oracle to postgresql" conversion |