Hi.Events icon indicating copy to clipboard operation
Hi.Events copied to clipboard

🐛 postgres docker container can't start with current docker-compose file

Open bengivre opened this issue 2 months ago • 2 comments

Describe the bug postgres docker isn't able to start

Error: in 18+, these Docker images are configured to store database data in a format which is compatible with "pg_ctlcluster" (specifically, using major-version-specific directory names). This better reflects how PostgreSQL itself works, and how upgrades are to be performed. See also https://github.com/docker-library/postgres/pull/1259 Counter to that, there appears to be PostgreSQL data in: /var/lib/postgresql/data (unused mount/volume) This is usually the result of upgrading the Docker image without upgrading the underlying database using "pg_upgrade" (which requires both versions). The suggested container configuration for 18+ is to place a single mount at /var/lib/postgresql which will then place PostgreSQL data in a subdirectory, allowing usage of "pg_upgrade --link" without mount point boundary issues. See https://github.com/docker-library/postgres/issues/37 for a (long) discussion around this process, and suggestions for how to do so.

This is not a bug related to Hi.Events directly.

Additional context Hi.Events-1.3.0-beta.1

** How to fix it : Replacing

    volumes:
      - pgdata:/var/lib/postgresql/data

By

    volumes:
      - pgdata:/var/lib/postgresql

Fixed the issue.

bengivre avatar Nov 06 '25 00:11 bengivre

Thanks for the report, @bengivre!

daveearley avatar Nov 15 '25 09:11 daveearley

I encountered the same issue but changing the volume mount as mentioned above did not resolve the error. The only way I was able to get the postgres container to start was by changing the version from latest to 17.1

ChaiFox avatar Nov 17 '25 06:11 ChaiFox