[英]PostgreSQL pg_restore errors: GRANT, REVOKE
I attempted to restore a PostgreSQL 9.5 database using this command: 我尝试使用以下命令还原PostgreSQL 9.5数据库:
pg_restore -C -d postgres -U postgres --no-owner --role=jsmith the_data.dump
Because the cluster I restored to is not the same as the cluster the dump was made on, some of the roles don't exist. 因为我还原到的群集与转储所在的群集不同,所以某些角色不存在。
There were many errors during the restore, but all of them involved GRANT
and RESTORE
. 还原期间存在许多错误,但所有错误都涉及GRANT
和RESTORE
。 Can I assume the actual data itself was restored without loss or modification? 我可以假定实际数据本身已还原而没有丢失或修改吗?
The GRANT
and REVOKE
errors can be ignored. GRANT
和REVOKE
错误可以忽略。 They don't effect the data load. 它们不会影响数据加载。
If you want to avoid the messages in future you can use the -x
parameter on pg_restore
(you can also use the synonyms --no-acl
or --no-privileges
). 如果您希望以后避免出现此消息,则可以在pg_restore
上使用-x
参数(也可以使用同义词--no-acl
或--no-privileges
)。
This stops pg_restore
trying to set the grants. 这将停止pg_restore
尝试设置授权。
pg_restore docs at https://www.postgresql.org/docs/current/static/app-pgrestore.html pg_restore文档, 网址为https://www.postgresql.org/docs/current/static/app-pgrestore.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.