heroku-pg-extras
heroku-pg-extras copied to clipboard
pg:push failing with must be owner of extension plpgsql
When trying to do:
heroku pg:push local HEROKU_DB
It's failing with the following dump:
pg_restore: creating COMMENT EXTENSION plpgsql
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 2605; 0 0 COMMENT EXTENSION plpgsql
pg_restore: [archiver (db)] could not execute query: ERROR: must be owner of extension plpgsql
Command was: COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
Tried using:
PGUSER=owner_of_db heroku pg:push local HEROKU_DB
but still nothing.
Any idea?
Hello – do you still have this issue? Can you update your version of the Heroku toolbelt and the pg-extras plugin and let me know if this is still an issue?
$ heroku update
Updating from 3.2.3... done, nothing to update
$ heroku plugins:update heroku-pg-extras
Updating heroku-pg-extras... done
Note that pg:push
and pg:pull
have been moved into the actual CLI at this point, so there may be some old code at play here.
I see this when I push my database to Heroku.
Locally, I have OS X 10.11.2 and:
$ psql --version
psql (PostgreSQL) 9.4.4
The pg:push
:
$ heroku pg:push -a myapp mydb DATABASE_URL
...
pg_restore: connecting to database for restore
pg_restore: creating SCHEMA public
pg_restore: creating COMMENT SCHEMA public
pg_restore: creating EXTENSION plpgsql
pg_restore: creating COMMENT EXTENSION plpgsql
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 2509; 0 0 COMMENT EXTENSION plpgsql
pg_restore: [archiver (db)] could not execute query: ERROR: must be owner of extension plpgsql
Command was: COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
pg_restore: creating TABLE mytable
...
WARNING: errors ignored on restore: 1
$ heroku pg:info -a myapp
=== DATABASE_URL
Plan: Hobby-basic
Status: Available
Connections: 2/20
PG Version: 9.4.5
Created: 2015-12-15 18:14 UTC
Data Size: 116.6 MB
Tables: 0
Rows: 0/10000000 (In compliance) - refreshing
Fork/Follow: Unsupported
Rollback: Unsupported
Region: Europe
Add-on: postgresql-parallel-5079
Locally I have:
$ heroku update
Updating plugins... no plugins to update.
$ heroku version
heroku-toolbelt/3.42.25 (x86_64-darwin14.5.0) ruby/1.9.3
heroku-cli/4.27.9-cce0260 (amd64-darwin) go1.5.2
=== Installed Plugins
heroku-accounts
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
Says "The error is harmless" over at http://dba.stackexchange.com/questions/90258/pg-restore-archiver-db-could-not-execute-query-error-schema-public-alre, but I thought I make a note here anyway. I haven't noticed any problems.
I'm hitting this problem, have any solutions been found more recently?
The error should be harmless. Unfortunately, there's no easy workaround or fix to make it disappear. Is this breaking things for you somehow?
@uhoh-itsmaciek thanks for the reply. I've found (as can often happen) it was a different issue that was actually causing the problem. So looks like it is harmless :)
@pmackay would you please share what the cause was? I'm getting the error myself.