Giter Club home page Giter Club logo

Comments (7)

srozb avatar srozb commented on May 24, 2024 1

As the docker-compose is using latest tag of postgres and the postgres 16 is now the latest, postgres container will fail to run with the following error:

linkwarden-postgres-1  | 2023-09-19 13:34:48.347 UTC [1] FATAL:  database files are incompatible with server
linkwarden-postgres-1  | 2023-09-19 13:34:48.347 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0 (Debian 16.0-1.pgdg120+1).

This is viable workaround:

# docker-compose.yml

image: postgres:15

from linkwarden.

Sebastix avatar Sebastix commented on May 24, 2024 1

As the docker-compose is using latest tag of postgres and the postgres 16 is now the latest, postgres container will fail to run with the following error:

linkwarden-postgres-1  | 2023-09-19 13:34:48.347 UTC [1] FATAL:  database files are incompatible with server
linkwarden-postgres-1  | 2023-09-19 13:34:48.347 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0 (Debian 16.0-1.pgdg120+1).

This is viable workaround:

# docker-compose.yml

image: postgres:15

Applied the same change to fix:

2023-11-22 15:28:59.169 UTC [1] FATAL:  database files are incompatible with server
2023-11-22 15:28:59.169 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.1 (Debian 16.1-1.pgdg120+1).

from linkwarden.

daniel31x13 avatar daniel31x13 commented on May 24, 2024

Hello @stanthewizzard,
AFAIK there shouldn't be any restrictions on which postgres version you are using.

from linkwarden.

stanthewizzard avatar stanthewizzard commented on May 24, 2024

after update ... doesn't work anymore in my case
I can revert to postfres and give it a try

from linkwarden.

stanthewizzard avatar stanthewizzard commented on May 24, 2024

I'm already with this workaround
thanks :)

from linkwarden.

stanthewizzard avatar stanthewizzard commented on May 24, 2024

found it

In docker-compose.yml you could change

db-data:/var/lib/postgresql/data:rw
to this

db-data:/var/lib/postgresql@16/data:rw
Delete image and run

docker-compose up -d
one more time

from linkwarden.

vnghia avatar vnghia commented on May 24, 2024

AFAIK, to upgrade a major postgres version, we will have to do it manually, either by dumping our database and reimporting it or using pg_upgrade. https://www.postgresql.org/docs/current/upgrading.html

from linkwarden.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.