Skip to content

Conversation

tianon
Copy link
Member

@tianon tianon commented Oct 15, 2025

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:

(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.)

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. 😂
@yosifkit yosifkit merged commit 2398775 into docker-library:master Oct 22, 2025
38 checks passed
@yosifkit yosifkit deleted the more-graceful-error branch October 22, 2025 00:04
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants