-
Notifications
You must be signed in to change notification settings - Fork 69
Description
Hi!
This is not exactly a bug report but more of a notice about a breaking change in Postgres 18. The side-effect that I got:
My user data and all datasets are lost. Luckily, I got this on a testing instance :)
I should add: you lose data not because of updating containers but due to fixing the compose.yml to accommodate Postgres 18. 4cat will just not work with Postgres 18, and this is good.
To avoid it:
- Before upgrading containers, check if your
.envhasPOSTGRES_TAG=latest - If it does, change it to 16 or 17.
- Only then start pulling the newer images.
I see that you also noticed this in 93bb522
What I figured out:
Starting version 18 Postgress no longer works with - 4cat_db:/var/lib/postgresql/data as all 4cat documentation suggest. Because of this:
To make it work:
- Add
PGDATA=/var/lib/postgresql/dataintoenvironmentsubsection of thedbcontainer - Change volume mouting:
volumes:
- 4cat_db:/var/lib/postgresqlHere is an example of the db section that will enable you to use 4cat with Postgres 18:
container_name: 4cat_db
image: postgres:latest
restart: unless-stopped
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_HOST_AUTH_METHOD=${POSTGRES_HOST_AUTH_METHOD}
- PGDATA=/var/lib/postgresql/data
volumes:
- 4cat_db:/var/lib/postgresql
healthcheck:
test:
- CMD-SHELL
- pg_isready -U $${POSTGRES_USER}
interval: 5s
timeout: 5s
retries: 5Unfortunately, this will give you a fresh and empty 4cat instance without your data. I plan to look into if its possible to recover. And I do not know yet of a way of how move my data between the versions.