heroku pg error when uploading changes and database: (Sequel::DatabaseError)

656 Views Asked by At

I made some changes in my local development version of my app.

Then I uploaded everything using git the usual thing.

To push my changes to the database I used:

heroku db:push

I get this error on my terminal:

Sending schema
/Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:175:in `async_exec': PG::Error: ERROR:  permission denied for relation temp_listings (Sequel::DatabaseError)
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:175:in `block (2 levels) in execute'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/database/logging.rb:28:in `log_yield'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:175:in `block in execute'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:158:in `check_disconnect_errors'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:175:in `execute'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:240:in `block (2 levels) in execute'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/connection_pool/threaded.rb:84:in `hold'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/database/connecting.rb:226:in `synchronize'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:240:in `block in execute'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:261:in `check_database_errors'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:238:in `execute'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:541:in `execute'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:319:in `fetch_rows'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:123:in `each'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:449:in `single_record'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:457:in `single_value'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:202:in `get'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:96:in `count'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:570:in `block in fetch_local_tables_info'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:569:in `each'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:569:in `fetch_local_tables_info'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:551:in `local_tables_info'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:556:in `tables'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:439:in `push_schema'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:407:in `block in run'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:203:in `call'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:203:in `catch_errors'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:405:in `run'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/cli.rb:172:in `clientxfer'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.25.0/lib/heroku/command/db.rb:194:in `taps_client'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.25.0/lib/heroku/command/db.rb:35:in `push'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.25.0/lib/heroku/command.rb:148:in `run'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.25.0/lib/heroku/cli.rb:9:in `start'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.25.0/bin/heroku:16:in `<top (required)>'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/bin/heroku:19:in `load'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/bin/heroku:19:in `<main>'

Any idea how to fix this or what Im doing wrong?

I already tried running the following:

heroku pg:reset 

then tried again heroku db:push that didnt work so I tried this

heroku run rake db:migrate

that didnt work either

so I created a new instance of my app and pushed it. Getting the same error

1

There are 1 best solutions below

1
On BEST ANSWER

While convenient, using taps (what db:push/pull uses) may not replicate your data exactly and may run into errors for larger transfers. To import or export data from your production system, we highly recommend using pgbackups instead. http://devcenter.heroku.com/articles/pgbackups