I am attempting to upgrade my version of PostgreSQL (from 9.2 to 9.6) on a Mac running 10.13.5.
I used pg_dumpall to backup the 9.2 database as per the instructions in the postgres documentation stopped the 9.2 instance and started the 9.6 one and then piped the backup file into the 9.6 version of psql.
As soon as it comes to create the tables I get these errors:
CREATE TYPE psql:/Library/PostgreSQL/backups/9.2.3-dumpall:250: ERROR: incompatible library "/Library/PostgreSQL/9.2/lib/postgis-2.0.so": version mismatch DETAIL: Server is version 9.6, library is version 9.2.
I have tried reinstalling a couple of times without making any difference.
I can't figure out why the loader is loading the 9.2 library instead of the 9.6. I have tried adding LD_LIBRARY_PATH to the environment but it made no difference.