I've just upgraded my Heroku app's PostgreSQL to version 12.
I'm currently having an issue with Heroku's pg:pull, where the extension/library from the server's pg_dump
is apparently an older version:
pg_restore: error: could not execute query: ERROR: incompatible library "/usr/local/lib/postgresql/btree_gin.so": version mismatch
DETAIL: Server is version 10, library is version 12.
Command was: CREATE EXTENSION IF NOT EXISTS btree_gin WITH SCHEMA public;
The command I run is: heroku pg:pull ${SERVER_DB} ${DEV_DB} -a ${APP}
I have attempted ALTER EXTENSION btree_gin UPDATE;
but it wasn't any help.
Any ideas?
I didn't realize that this error was concerning my local machine's PostgreSQL server version—not the server on Heroku.
Doing brew postgresql-upgrade-database
would resolve this by upgrading the server version.
I ended up just deleting my existing local database and reinstalling PostgreSQL instead because running brew postgresql-upgrade-database
involves copying entire tables; I didn't have enough space in local storage.