我已经在centos 6.5上使用yum安装安装了pgloader。我无法让pgloader加载以下文件。我在shell上的命令是pgloader mysql.load

 LOAD DATABASE
 from      mysql://root:[email protected]:7777/demomysql
 into postgresql://postgres:[email protected]:5432/dbname?demopsql

WITH include drop, create tables, no truncate,
    create indexes, reset sequences, foreign keys

SET maintenance_work_mem to '128MB', work_mem to '12MB', search_path to 'demopsql'

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

-- MATERIALIZE VIEWS film_list, staff_list

-- INCLUDING ONLY TABLE NAMES MATCHING ~/film/, 'actor'
-- EXCLUDING TABLE NAMES MATCHING ~<ory>

BEFORE LOAD DO
$$ create schema if not exists demopsql; $$;

我得到以下日志文件
 pgloader     INFO     Logger initialized
 pgloader     WARNING  path entry '/usr/share/python-support/pgloader/reformat' does not        exists, ignored
 pgloader     INFO     Reformat path is []
 pgloader     INFO     Will consider following sections:
 pgloader     INFO
 pgloader     INFO     All threads are started, wait for them to terminate

最佳答案

这个警告是由于一个错误引起的。
在/usr/share/pyshared/pgloader/options.py中搜索变量DEFAULT_REFORMAT_PATH
将给定的路径替换为
/usr/share/pyshared/reformat。
文件上也有一个错误:dbname?demopsql应该是demopsql

关于mysql - 有没有人让pgloader能够从Mysql迁移到Postgres,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/25164552/

10-13 06:51