我对pg_dump和restore使用了以下语法
pg_dump eval --inserts -b -c --encoding UTF8 -Fc -f eval.sql.tar.gz -x -U postgres
createdb -T template0 test -U postgres
pg_restore -d test eval.sql.tar.gz -e -U postgres转储是成功的,没有错误,但恢复了一些错误,我正在转储和恢复在同一台机器上,相同的用户和特权都…
我也尝试过其他格式,普通的,tar的,压缩的都得到了同样的错误..
我的pg版本是8.4.11,psql版本是8.4.11
我不确定是什么造成了这些错误..有人能帮我吗?
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 4965; 0 138871 TABLE DATA ir_act_report_xml insigni
pg_restore: [archiver (db)] could not execute query: ERROR: invalid input syntax for integer: "purchase.order"
LINE 1: ...st for Quotation', 'ir.actions.report.xml', NULL, 'purchase....
^
Command was: INSERT INTO ir_act_report_xml VALUES (350, 'Request for Quotation', 'ir.actions.report.xml', NULL, 'purchase.order', 'purcha...发布于 2012-04-12 17:25:56
这就起到了作用
pg_dump database_name -c -Ft -f file_name.tar
pg_restore -d database_name -c file_name.tar在此之前,我试图在不包含-c的情况下进行恢复(干净)
即使-c包含在pg_dump中,它也不会在pg_restore中使用,除非我们说使用...
发布于 2018-03-15 15:49:31
我的解决方案是:
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U username -d database_name dump_name.dump发布于 2021-04-27 23:06:41
This为我工作:
在postgresql.conf中增加max_wal_size postgresql设置(max_wal_size =2 2GB
https://stackoverflow.com/questions/9836627
复制相似问题