Heroku: PG :: Error: ERROR: permission denied for relationship

Every time I try to save something in the database, I get this error message. I saw that Heroku offers a free PostgreSQL database for the first 10,000 records, more than 10,000 records are needed to pay for the database.

Right now, there are 60,000 entries in my database. How to fix this error / update the database?

Thank you in advance

+8
ruby ruby-on-rails postgresql heroku
source share
5 answers

You want to use the PG Backups add-in to back up your database, and then transfer it from your dev / base plan to the production (paid) plan.

In short:

  • Presenting Heroku Postgresql's New Production Plan
  • Put the app in maintenance mode to prevent new updates.
  • Backup capture
  • Restore updated database
  • Promote a new database for primary
  • Activate application

https://devcenter.heroku.com/articles/upgrade-heroku-postgres-with-pgbackups

+6
source share

You have exceeded your limit. You need to switch to a larger plan , delete data, or live with read-only access. These are your three options.

+5
source share

First of all, you need to update your plan for the hero. To do this, go to this link.

This is a very good article, which explains all the steps to transfer the database to the hero to another plane.

I also ran into this problem and fixed the problem smoothly using the above guide.

0
source share

Or:

Download the dump from db locally. Clean it up. Put this dump on the hero.

Or:

Connect via psql or pgadmin to the remote database and clear it.

This answer is not sponsored by Heroku

0
source share

Just wanted to add my solution for posterity. I had the same problem when I received the error message :Heroku: PG::Error: ERROR: permission denied for relation" , although I only used the 180/10000 rows of my database. I did:

 heroku restart 

and this fixed the problem.

0
source share

All Articles