dimitri / pgloader

Migrate to PostgreSQL in a single command!
http://pgloader.io
Other
5.47k stars 550 forks source link

Importer stuck at certain table #337

Closed pathikrit closed 7 years ago

pathikrit commented 8 years ago

My config:

LOAD database
  FROM  mysql://dev:dev@localhost/main
  INTO  postgresql://dev@localhost/main
  WITH  include no drop, create tables, no truncate, create indexes, reset sequences, foreign keys
  SET   maintenance_work_mem to '128MB', work_mem to '12MB'
  CAST type datetime to timestamptz drop default drop not null using zero-dates-to-null,
       type date drop not null drop default using zero-dates-to-null
  BEFORE LOAD DO $$ CREATE SCHEMA IF NOT EXISTS main; $$
;

Last few lines in log fie:

2016-02-04T14:18:01.924000-08:00 NOTICE CREATE INDEX idx_16684_fk_entity_types_render_field_id ON entity_types (render_field_id);
2016-02-04T14:18:01.924000-08:00 NOTICE CREATE INDEX idx_16684_fk_entity_types_sort_field_id ON entity_types (sort_field_id);
2016-02-04T14:18:01.924000-08:00 NOTICE CREATE UNIQUE INDEX idx_16684_name ON entity_types (name);
2016-02-04T14:18:01.924000-08:00 NOTICE CREATE UNIQUE INDEX idx_16684_primary ON entity_types (id);
2016-02-04T14:18:01.924000-08:00 NOTICE COPY events
2016-02-04T14:19:00.839000-08:00 NOTICE CREATE UNIQUE INDEX idx_16693_primary ON events (id);
2016-02-04T14:19:00.839000-08:00 NOTICE CREATE INDEX idx_16693_user ON events ("user");
2016-02-04T14:19:00.840000-08:00 NOTICE COPY field_audits
2016-02-04T14:19:22.322000-08:00 NOTICE CREATE INDEX idx_16702_entity_type_id ON field_audits (entity_type_id);
2016-02-04T14:19:22.322000-08:00 NOTICE CREATE INDEX idx_16702_field_id ON field_audits (field_id);
2016-02-04T14:19:22.322000-08:00 NOTICE CREATE INDEX idx_16702_fk_field_audits_context_fund_id ON field_audits (context_fund_id);
2016-02-04T14:19:22.324000-08:00 NOTICE CREATE INDEX idx_16702_fk_field_audits_fund_id ON field_audits (fund_id);
2016-02-04T14:19:22.324000-08:00 NOTICE CREATE INDEX idx_16702_fk_field_audits_impersonating_user_id ON field_audits (impersonating_user_id);
2016-02-04T14:19:22.324000-08:00 NOTICE CREATE INDEX idx_16702_last_field_update ON field_audits (entity_id, field_id, context_fund_id, update_time);
2016-02-04T14:19:22.324000-08:00 NOTICE CREATE UNIQUE INDEX idx_16702_primary ON field_audits (id);
2016-02-04T14:19:22.324000-08:00 NOTICE CREATE INDEX idx_16702_smartlist_id ON field_audits (smartlist_id);
2016-02-04T14:19:22.324000-08:00 NOTICE CREATE INDEX idx_16702_user ON field_audits ("user");
2016-02-04T14:19:22.324000-08:00 NOTICE CREATE INDEX idx_16702_view_id ON field_audits (view_id);
2016-02-04T14:19:22.729000-08:00 NOTICE COPY field_search_alias
2016-02-04T14:19:23.337000-08:00 NOTICE COPY files
mysql> select count(*) FROM files;
2071217

psql> select count(*) FROM files;
2050000

Its strange it is stuck at such a round number for 2 hours. Do I need to tweak some params? The total size of my mysql db is 20GB...

dimitri commented 7 years ago

I did the whole account creation but even then it seems I can't download the file. If you can make it available to me that would help. Thanks.

dimitri commented 7 years ago

I've been given a test case I could use to reproduce the error, and can't anymore. Please try with fresh sources.