Postgresql Error creating COMMENT "EXTENSION plpgsql while migrating from Heroku

I’m just migrating a database from Heroku to Render.com and received this error message:

pg_restore: creating COMMENT "SCHEMA "public""
pg_restore: creating EXTENSION "plpgsql"
pg_restore: creating COMMENT "EXTENSION "plpgsql""
pg_restore: from TOC entry 4946; 0 0 COMMENT EXTENSION "plpgsql" 
pg_restore: error: could not execute query: ERROR:  must be owner of extension plpgsql
Command was: COMMENT ON EXTENSION "plpgsql" IS 'PL/pgSQL procedural language';

Does that mean the postgres extension will not work?

Hi there,
That extension is enabled by default - https://render.com/docs/databases#postgresql-extensions

Regards,

John B

I ran into a similar issue - I don’t think the extension is missing, but rather whatever process is running the rails db:structure:load command doesn’t have the appropriate permissions. As a workaround, I was able to follow the approach here (basically just run the command while ignoring errors) https://stackoverflow.com/a/53866298

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.