I’m trying to get postgres 14 (upgrading from 11) to work locally. Initially the docker file looked like:
db:
image: postgres-14.11
environment:
volumes:
healthcheck:
test:
timeout: 20s
retries: 10
ports:
- "5432:5432"
When running this ended up giving the following error:
find /usr -name postgis.control -->>DETAIL: Could not open extension control file "/usr/share/postgresql/15/extension/postgis.control": No such file or directory.
So i did some research and tried to change my docker-compose to:
db:
image: postgis/postgis:14-3.4
environment:
volumes:
healthcheck:
test:
timeout: 20s
retries: 10
ports:
- "5432:5432"
this instead gave me this error:
django.db.utils.IntegrityError: duplicate key value violates unique constraint "pg_extension_name_index"
DETAIL: Key (extname)=(postgis) already exists.
which doesn’t make sense to me .. not sure what’s happening or what the fix for this should be