Remove intentionally-breaking "data" symlink and add better detection #1372
+275
−53
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:
PGDATA
in 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.)