plausible / community-edition

Example Docker Compose setup for hosting Plausible Community Edition
1.39k stars 297 forks source link

Existing installation fails to start because Postgres 14 refuses to load Postgres 12 files. #69

Closed russellballestrini closed 1 year ago

russellballestrini commented 1 year ago

The postgres database is no longer supported by postgres 14.

I can only get my installation to boot by changing to version 12 in the docker-compose.yml file.

https://github.com/plausible/hosting/blob/master/docker-compose.yml#L9

  plausible_db:
    # supported versions are 12, 13, and 14
    #image: postgres:14-alpine
    image: postgres:12-alpine
root@analytics:~# docker logs 9186dfbb124d #postgres:14-alpine

PostgreSQL Database directory appears to contain a database; Skipping initialization

2023-04-15 15:07:35.529 UTC [1] FATAL:  database files are incompatible with server
2023-04-15 15:07:35.529 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 12, which is not compatible with this version 14.5.

It seems like version 14.5 of this postres docker image has dropped backwards support for 12.

ruslandoga commented 1 year ago

👋 @russellballestrini

That's right. You need to perform an upgrade: https://github.com/plausible/hosting/blob/master/upgrade/postgres.md

russellballestrini commented 1 year ago

thanks for the rapid reply, I'll try to work out the steps to upgrade.