Skip to content

Conversation

@nnobelis
Copy link
Contributor

The Postgres 18 Docker image requires the filesystem path where the DB is stored to contain the database version. See 1.

The Postgres 18 Docker image requires the filesystem path where the DB is
stored to contain the database version. See [1].

[1]: docker-library/postgres#1259

Signed-off-by: Nicolas Nobelis <[email protected]>
@sschuberth
Copy link
Contributor

Did you see 240ce82 in this regard?

@nnobelis
Copy link
Contributor Author

Did you see 240ce82 in this regard?

Interesting. Without the changes of current PR, I was getting the error you mentioned in 240ce82. I am surprised it was enough for you.

@sschuberth
Copy link
Contributor

I am surprised it was enough for you.

IIRC it also solved the issue for @Etsija and @lamppu. Can you both remember / confirm?

@nnobelis
Copy link
Contributor Author

I tested again with db:/var/lib/postgresql/ and I get:

ostgres-1  | Error: in 18+, these Docker images are configured to store database data in a
postgres-1  |        major-version-specific directory names).  This better reflects how
postgres-1  | 
postgres-1  |        See also https://github.com/docker-library/postgres/pull/1259
postgres-1  | 
postgres-1  |          /var/lib/postgresql
postgres-1  | 
postgres-1  |        upgrading the underlying database using "pg_upgrade" (which requires both
postgres-1  | 
postgres-1  |        The suggested container configuration for 18+ is to place a single mount
postgres-1  |        subdirectory, allowing usage of "pg_upgrade --link" without mount point

However I didn't use pg_upgrade --link, just pg_upgrade. So maybe my setup is to blame.

What do you think ? Should I close current PR ?

@sschuberth
Copy link
Contributor

What do you think ? Should I close current PR ?

Ideally, you'd be able to redo the upgrade with pg_upgrade --link to confirm the existing fix, then we could close this with confidence.

Otherwise, let's wait for some more feedback from others.

@lamppu
Copy link
Contributor

lamppu commented Dec 15, 2025

I am surprised it was enough for you.

IIRC it also solved the issue for @Etsija and @lamppu. Can you both remember / confirm?

Yes I think it did, but we haven't used pg_upgrade, we've been advised to use this process instead when we want to keep the old data https://eclipse-apoapsis.github.io/ort-server/docs/admin-guide/getting-started/docker-compose/#major-version-upgrades-of-postgresql

@nnobelis nnobelis closed this Dec 15, 2025
@nnobelis nnobelis deleted the nnobelis/fix_docker_compose_file branch December 15, 2025 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants