Remove intentionally-breaking "data" symlink and add better detection#1372
Merged
yosifkit merged 1 commit intodocker-library:masterfrom Oct 22, 2025
Merged
Conversation
This allows for a more graceful error message for the case of users who need to update their volume path. I tested this with 17 and `--env PGDATA=/var/lib/postgresql/17/docker` (to make sure it still works fine and doesn't complain about the extra volume provided by Docker/`VOLUME`) and 18 with `-v /var/lib/postgresql/data` (where it appropriately errors and explains to me what I should be doing instead). I also did a reflow on some text in the error message that's designed to fit in 80 columns but was taking 81. 😂
cb94d6d to
5ec8931
Compare
yosifkit
approved these changes
Oct 22, 2025
docker-library-bot
added a commit
to docker-library-bot/official-images
that referenced
this pull request
Oct 22, 2025
Changes: - docker-library/postgres@2398775: Merge pull request docker-library/postgres#1372 from infosiftr/more-graceful-error - docker-library/postgres@5ec8931: Remove intentionally-breaking "data" symlink and add better detection
tianon
pushed a commit
to docker-library/official-images
that referenced
this pull request
Oct 22, 2025
Changes: - docker-library/postgres@2398775: Merge pull request docker-library/postgres#1372 from infosiftr/more-graceful-error - docker-library/postgres@5ec8931: Remove intentionally-breaking "data" symlink and add better detection Co-authored-by: Docker Library Bot <doi+docker-library-bot@docker.com>
This was referenced Oct 22, 2025
StamatisKourk
pushed a commit
to elastic/official-images
that referenced
this pull request
Nov 11, 2025
Changes: - docker-library/postgres@2398775: Merge pull request docker-library/postgres#1372 from infosiftr/more-graceful-error - docker-library/postgres@5ec8931: Remove intentionally-breaking "data" symlink and add better detection Co-authored-by: Docker Library Bot <doi+docker-library-bot@docker.com>
junojense
pushed a commit
to DDVTECH/docker-image-library
that referenced
this pull request
Dec 3, 2025
Changes: - docker-library/postgres@2398775: Merge pull request docker-library/postgres#1372 from infosiftr/more-graceful-error - docker-library/postgres@5ec8931: Remove intentionally-breaking "data" symlink and add better detection Co-authored-by: Docker Library Bot <doi+docker-library-bot@docker.com>
This was referenced Jan 26, 2026
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.
This allows for a more graceful error message for the case of users who need to update their volume path.
I tested this with 17 and
--env PGDATA=/var/lib/postgresql/17/docker(to make sure it still works fine and doesn't complain about the extra volume provided by Docker/VOLUME) and 18 with-v /var/lib/postgresql/data(where it appropriately errors and explains to me what I should be doing instead).I also did a reflow on some text in the error message that's designed to fit in 80 columns but was taking 81. 😂
Closes #1363
Closes #1364
Closes #1370
See also:
PGDATAin 18+ to/var/lib/postgresql/MAJOR/docker#1259(I was initially hesitant to implement this because I thought the implementation would be bigger, but we already had most of the scaffolding so it was really trivial.)