简体   繁体   English

PostgreSQL pg_restore错误:授权,撤销

[英]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 . 还原期间存在许多错误,但所有错误都涉及GRANTRESTORE Can I assume the actual data itself was restored without loss or modification? 我可以假定实际数据本身已还原而没有丢失或修改吗?

The GRANT and REVOKE errors can be ignored. GRANTREVOKE错误可以忽略。 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.

相关问题 将 PostgreSQL pg_restore 性能从 130 小时提高 - Improve PostgreSQL pg_restore Performance from 130 hours 如何连接到postgresql google云sql实例? 需要使用pg_restore命令导入postgresql转储 - How to connect to postgresql google cloud sql instance? Need to import postgresql dump using pg_restore command pgadmin4的PostgreSQL pg_restore错误显示角色不存在 - PostgreSQL pg_restore error from pgadmin4 showing role doesn't exist 使用pg_restore创建或覆盖表 - Using pg_restore to create or overwrite tables pg_restore 适用于 zip 文件? - pg_restore works with zip file? 如果 pg_restore 正在进行,我们会在应用程序中遇到任何运行时问题吗? - Will we face any runtime issue in application if pg_restore is in progress? 如何在Windows命令行上使用pg_restore? - How to use pg_restore on Windows Command Line? pg_restore 错误:角色 XXX 不存在 - pg_restore error: role XXX does not exist 不同服务器之间的 pg_dump 和 pg_restore 具有对要转储的数据的选择标准 - pg_dump and pg_restore between different servers with a selection criteria on the data to be dumped pg_restore后,报错; PG::ConnectionBad fe_sendauth:未提供密码 - After pg_restore, an error; PG::ConnectionBad fe_sendauth: no password supplied
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM