psql is CPU-bound reading mysqldump output, so it's extremely slow to load records. This script runs as many instances of psql in parallel as possible.
Determines the number of CPUs, which has been tested in Ubuntu.
Assumes data loaded from mysql has timestamps in EST5EDT time zone and has been dumped using the following command line:
mysqldump -f --skip-tz-utc --skip-add-locks --skip-lock-tables --no-create-db --no-create-info --complete-insert --default-character-set=utf8 --max_allowed_packet=1M --net_buffer_length=1M --compatible=postgresql $database $table --result-file=$file;