
Pgloader – migrate your data from any SQL database into PostgreSQL - humility
https://github.com/dimitri/pgloader
======
dfsegoat
We've been using pgloader as part of our production workflows between RDBMS'
for about a year now. Overall I am super impressed with the speed and
reliability of it.

Some gotchas:

\- MySQL to Postgres needs some massaging for int-types. Pgloader will convert
MySQL bigint to type "numeric" by default - which is a bit of overkill.

\- For issues like the above, they have a handy syntax for the pgloader
template files which lets you do datatype casts on the fly. [1]

1 -
[https://pgloader.readthedocs.io/en/latest/ref/mysql.html#mys...](https://pgloader.readthedocs.io/en/latest/ref/mysql.html#mysql-
database-casting-rules)

~~~
humility
We're using it for migration from sqlite to postgres. Never found a more
useful single line command.

------
lukastr0
Pgloader is a great project, and I planned to use it for database migration of
a small commercial product (from SQL Server).

Unfortunately, I never go it to work. Tried three different distros (Ubuntu /
Debian / Amazon Linux). Sometimes installation would fail, other times it
would crash on first run - even when following instructions to the letter.

When I finally got it to run, it could not connect to SQL Server, and no one
on Github could help with my particular error message.

Ended up writing the migration code myself, which took only a few hours. The
lesson: for a very simple migration, pgloader was actually overkill and a
self-made solution did the job quicker.

------
jjice
I've noticed recently that Postgres is really gaining in popularity,
especially as a MySQL alternative. Why is that? Is it because of Oracle's
involvement in MySQL or has Postgres really improved in performance?

~~~
kjeetgill
Postgres has earned the reputation for doing thinking features through,
rolling improvements out reliably, and is pretty committed to doing things
right (tm). This has meant fewer/slower _hot_ features in the past, but solid
when they arrive. It feels like they've pulled ahead in many features now. My
favorite is all the indexing options.

It may be undeserved now, but MySQL had/has a reputation for a lot of sloppy
work for good enough features or for performance. Mysql dropped MyISAM for
InnoDB in an effort to undo some of that damage so it's hard for me to say
they're not committed to quality now.

But reputations take time to rebuild.

------
poweredbylisp
Nice to see that it's

    
    
        Common Lisp 96.7%
        Makefile 1.9%
        Other 1.4%

------
aidenn0
For those interested in learning more about PostreSQL, I'd recommend the book
by the author of this tool[1]. It's bee a great resource for me. It's a great
introduction to SQL with a focus on postgres.

(FWIW, it was called "Mastering PostgreSQL" when I bought it, but as far as I
can tell, the site I linked is just an updated version).

1: [https://theartofpostgresql.com/](https://theartofpostgresql.com/)

------
ilikepi
The author of this tool also appears to maintain a website[1] with information
about migrating from MySQL to Postgres.

[1]: [http://mysqltopgsql.com/](http://mysqltopgsql.com/)

