PGError:ERROR:关系的权限被拒绝(当使用Heroku时) [英] PGError: ERROR: permission denied for relation (when using Heroku)

查看:689
本文介绍了PGError:ERROR:关系的权限被拒绝(当使用Heroku时)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近完成了此处列出的数据库迁移过程:



https://devcenter.heroku.com/articles/migrating-from-shared-database-to-heroku-postgres p>

现在我在日志中看到一些错误,如下所示:



PGError:ERROR:permission Denied关系



关于我应该如何解决它的任何想法?

解决方案

p>我有一个类似的问题,但根本原因是我的应用程序指向旧的开发数据库,​​已超过其上限为10,000行。



虽然我创建了一个新的基本数据库,并支持一切,应用程序仍指向旧的开发数据库。



<



检查行数:10300/10000 p>

您需要为此配备一个 b $ b 1)创建具有更多行的新数据库(基本或生产 - > Heroku强制升级以赚取更多的钱errrrrr)



2)使用pgbackups备份旧的DB: heroku pgbackups:capture SMALL_DB_NAME


3)将备份还原到新数据库: heroku pgbackups:还原BIG_DB_NAME BACKUP_ID (请参阅下面的链接了解详情) />

4)将新数据库推送到应用程序的主数据库: heroku pg:promote BIG_DB_NAME



可随时使用:



heroku maintenance:on(在更新时停用应用程式)



p>



heroku维护:








heroku pg:info以检查状态)



如果这是问题,您可能想要签出:
https://devcenter.heroku.com/articles/heroku-postgres-starter-tier
https://devcenter.heroku.com/articles/migrating -from-shared-database-to-heroku-postgres


I've recently gone through the database migration process as outlined here:

https://devcenter.heroku.com/articles/migrating-from-shared-database-to-heroku-postgres

Now I'm seeing a number of errors in the logs like this:

PGError: ERROR: permission denied for relation

Any ideas on what I should do to fix it?

解决方案

I had a similar problem but the root cause was that my app was pointing to the old dev database which had exceeded it's limit of 10,000 rows.

Although I created a new Basic db and backed everything up, the app was still pointing the old dev DB.

heroku pg:info

Check to see the rows: 10300/10000 (then you have a problem)

You will need to

1) Create new DB with more rows (Basic or the "Production" ones -> Heroku seems to be forcing an upgrade to make more money errrrrr)

2) backup the old DB using pgbackups: heroku pgbackups:capture SMALL_DB_NAME

3) restore the backup to the new DB: heroku pgbackups:restore BIG_DB_NAME BACKUP_ID (see links below for more details)

4) PROMOTE the new DB to the primary for the app: heroku pg:promote BIG_DB_NAME

can always utilize:

heroku maintenance:on (to disable the app while updating)


heroku maintenance:off


heroku pg:info (to check the status)

If this is the problem you may want to check out: https://devcenter.heroku.com/articles/heroku-postgres-starter-tier https://devcenter.heroku.com/articles/migrating-from-shared-database-to-heroku-postgres

这篇关于PGError:ERROR:关系的权限被拒绝(当使用Heroku时)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆