bump postgres 13.1 -> 18.3 with explicit PGDATA#120
Open
VasilenkovDenis wants to merge 1 commit into
Open
Conversation
## Problem `postgres:18+` changed default `PGDATA` to `/var/lib/postgresql/18/docker`. With existing mount `./postgres/data:/var/lib/postgresql/data`, the container fails on first start with `unused mount/volume` — even on an empty directory. ## Fix - Bump image `postgres:13.1` → `postgres:18.3` (minor pinned per convention) - Set `PGDATA=/var/lib/postgresql/data/pgdata` to keep existing mount and place pg18 data in a subdirectory (workaround suggested by the postgres image itself) ## Validation Reproduced and verified end-to-end on sandbox (postgres:18.3 / Debian 13) and on MOEX pilot deployment (2026-05-18). All 7 services healthy, `./postgres/data/pgdata/` initialised correctly. Refs: docker-library/postgres#1259, docker-library/postgres#37
Contributor
|
@KGOH вот риск забавно реализовался. Мне всегда не нравилось монтировать "случайную" директорию. @VasilenkovDenis может они погорячились и назад откатят? Может быть есть issue на эту тему у них? |
Contributor
Author
|
@darkleaf к сожалению нет, Postgres 13.1 не прошел СБ Мос Биржи, поэтому и было реализовано на 18-ой версии (что ранее обсуждали), но с применением фикса, так как контейнер падал с unused mount/volume. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
postgres:18+changed defaultPGDATAto/var/lib/postgresql/18/docker.With existing mount
./postgres/data:/var/lib/postgresql/data, the containerfails on first start with
unused mount/volume— even on an empty directory.Fix
postgres:13.1→postgres:18.3(minor pinned per convention)PGDATA=/var/lib/postgresql/data/pgdatato keep existing mount and placepg18 data in a subdirectory (workaround suggested by the postgres image itself)
Validation
Reproduced and verified end-to-end on sandbox (postgres:18.3 / Debian 13) and
on MOEX pilot deployment (2026-05-18). All 7 services healthy,
./postgres/data/pgdata/initialised correctly.Refs: docker-library/postgres#1259, docker-library/postgres#37