The data directory was initialized by PostgreSQL version 14, which is not compatible with this version 15.0. #239

Closed
opened 2026-02-04 18:02:21 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @MFYDev on GitHub (Oct 18, 2022).

2022-10-18 17:39:05.010 UTC [1] DETAIL: The data directory was initialized by PostgreSQL version 14, which is not compatible with this version 15.0.

Hello, today the newest version of postgresql released and I installed planka by using docker-compose, could you please add support to the postgresql 15?
Thanks a lot

Originally created by @MFYDev on GitHub (Oct 18, 2022). 2022-10-18 17:39:05.010 UTC [1] DETAIL: The data directory was initialized by PostgreSQL version 14, which is not compatible with this version 15.0. Hello, today the newest version of postgresql released and I installed planka by using docker-compose, could you please add support to the postgresql 15? Thanks a lot
Author
Owner

@meltyshev commented on GitHub (Oct 19, 2022):

Hi! It looks like you already had a volume planka_db-data that was initialized by PostgreSQL version 14. So you just need to convert it to the new version. You can find many options here: https://github.com/docker-library/postgres/issues/37 (I haven't tried and don't know which is the easiest way). Or if you don't need the previous data, then you can simply delete it and it should be recreated the next time you run it.

@meltyshev commented on GitHub (Oct 19, 2022): Hi! It looks like you already had a volume planka_db-data that was initialized by PostgreSQL version 14. So you just need to convert it to the new version. You can find many options here: https://github.com/docker-library/postgres/issues/37 (I haven't tried and don't know which is the easiest way). Or if you don't need the previous data, then you can simply delete it and it should be recreated the next time you run it.
Author
Owner

@timshannon commented on GitHub (Oct 19, 2022):

Just ran into this myself, and I think the real issue is the fact that planka's docker-compose file references an un-versioned image of postgres (image: postgres:alpine), so it auto updates to the latest postgres version. Usually for DB's in docker-compose they'll reference the specific supported version for the application, and provide upgrade paths if they ever change.

The easiest option for most people is probably just to update their docker-compose file to reference version 14:

version: '3'

services:
  planka:
    image: ghcr.io/plankanban/planka:latest
    command: >
      bash -c
        "for i in `seq 1 30`; do
          ./start.sh &&
          s=$$? && break || s=$$?;
          echo \"Tried $$i times. Waiting 5 seconds...\";
          sleep 5;
        done; (exit $$s)"
    restart: unless-stopped
    volumes:
      - user-avatars:/app/public/user-avatars
      - project-background-images:/app/public/project-background-images
      - attachments:/app/private/attachments
    ports:
      - 3000:1337
    environment:
      - BASE_URL=http://localhost:3000
      - TRUST_PROXY=0
      - DATABASE_URL=postgresql://postgres@postgres/planka
      - SECRET_KEY=notsecretkey
    depends_on:
      - postgres

  postgres:
    image: postgres:14-alpine  # <-- update here
    restart: unless-stopped
    volumes:
      - db-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=planka
      - POSTGRES_HOST_AUTH_METHOD=trust

volumes:
  user-avatars:
  project-background-images:
  attachments:
  db-data:

I might also argue that the main repo's docker-compose file should also make this update, and reflect whatever version of postgres they develop and test on.

@timshannon commented on GitHub (Oct 19, 2022): Just ran into this myself, and I think the real issue is the fact that planka's docker-compose file references an un-versioned image of postgres (`image: postgres:alpine`), so it auto updates to the latest postgres version. Usually for DB's in docker-compose they'll reference the specific supported version for the application, and provide upgrade paths if they ever change. The easiest option for most people is probably just to update their docker-compose file to reference version 14: ```yaml version: '3' services: planka: image: ghcr.io/plankanban/planka:latest command: > bash -c "for i in `seq 1 30`; do ./start.sh && s=$$? && break || s=$$?; echo \"Tried $$i times. Waiting 5 seconds...\"; sleep 5; done; (exit $$s)" restart: unless-stopped volumes: - user-avatars:/app/public/user-avatars - project-background-images:/app/public/project-background-images - attachments:/app/private/attachments ports: - 3000:1337 environment: - BASE_URL=http://localhost:3000 - TRUST_PROXY=0 - DATABASE_URL=postgresql://postgres@postgres/planka - SECRET_KEY=notsecretkey depends_on: - postgres postgres: image: postgres:14-alpine # <-- update here restart: unless-stopped volumes: - db-data:/var/lib/postgresql/data environment: - POSTGRES_DB=planka - POSTGRES_HOST_AUTH_METHOD=trust volumes: user-avatars: project-background-images: attachments: db-data: ``` I might also argue that the main repo's docker-compose file should also make this update, and reflect whatever version of postgres they develop and test on.
Author
Owner

@vakarian92 commented on GitHub (Oct 19, 2022):

Thank you @timshannon I was having the same issue, really appreciated. I agree as well with what said about fixed version for
the database and upgrade path.

@vakarian92 commented on GitHub (Oct 19, 2022): Thank you @timshannon I was having the same issue, really appreciated. I agree as well with what said about fixed version for the database and upgrade path.
Author
Owner

@meltyshev commented on GitHub (Oct 20, 2022):

Totally agree, I'll lock the version.

@meltyshev commented on GitHub (Oct 20, 2022): Totally agree, I'll lock the version.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#239