源库:psql (PostgreSQL) 9.4.26
目标库:psql (PostgreSQL) 9.4.24
将原库testdb下tmp schema导入到目标库tdb下tmp schema,
pg_dump -d testdb -n tmp -t tmp.test1 -t tmp.test2 -Fd -j2 -f tmpbak1104
pg_restore -d tdb -n tmp -O tmpbak1104 -j2
导人时报错:
pg_restore: [archiver (db)] pg_restore: [archiver (db)] Error from TOC entry 122280; 0 0 ACL TABLE bi_dm_asset_mid_cust_month_his analyst
Error from TOC entry 122281; 0 0 ACL TABLE bi_dm_fund_stock analyst
pg_restore: [archiver (db)] pg_restore: [archiver (db)] could not execute query: ERROR: role "analyst" does not exist
Command was: REVOKE ALL ON TABLE tmp.bi_dm_asset_mid_cust_month_his FROM PUBLIC;
REVOKE ALL ON TABLE tmp.bi_dm_asset_mid_cust_month_his F...
could not execute query: ERROR: role "analyst" does not exist
Command was: REVOKE ALL ON TABLE tmp.bi_dm_fund_stock FROM PUBLIC;
REVOKE ALL ON TABLE tmp.bi_dm_fund_stock FROM analyst;
GRANT ALL ON TA...
postgresql 数据库在导入时,怎么忽略类似授权的错误,还是说必须要把对应的role全部建好?