Upgrade PostgreSQL to v18 with updated volume mount path#105
Open
snickerjp wants to merge 4 commits into
Open
Conversation
- Change image from pgautoupgrade/pgautoupgrade:17-alpine to 18-alpine - Update volume mount from /var/lib/postgresql/data to /var/lib/postgresql (required by PostgreSQL 18's new data directory structure) - Add comment with migration hints for existing users Fixes getredash#86
- Add 'How do I backup my PostgreSQL database?' with pg_dumpall command - Add 'How do I upgrade PostgreSQL to a newer major version?' with link to pgautoupgrade documentation
There was a problem hiding this comment.
Pull request overview
Updates the production Docker Compose setup to PostgreSQL 18 via pgautoupgrade, adjusting the persistent volume mount to accommodate the upstream PostgreSQL 18 image data-directory layout changes, and adds operator guidance for backup/upgrade workflows.
Changes:
- Bump PostgreSQL container image from
pgautoupgrade:17-alpinetopgautoupgrade:18-alpine. - Update the PostgreSQL volume mount from
/var/lib/postgresql/datato/var/lib/postgresqland add migration guidance comments. - Add README FAQ entries for backing up PostgreSQL and upgrading from PG17→PG18.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| README.md | Adds FAQ guidance for database backups and major-version upgrade steps. |
| data/compose.yaml | Switches to PG18 pgautoupgrade image and updates the data volume mount path with migration notes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Summary
Upgrades the PostgreSQL image from v17 to v18, addressing the data directory path change introduced by the official Docker PostgreSQL image (docker-library/postgres#1259).
Changes
compose.yaml
pgautoupgrade/pgautoupgrade:17-alpine→pgautoupgrade/pgautoupgrade:18-alpine/opt/redash/postgres-data:/var/lib/postgresql/data→/opt/redash/postgres-data:/var/lib/postgresqlREADME.md
Why pgautoupgrade instead of the official postgres image?
The Redash development repo (getredash/redash) uses
postgres:18-alpinefor development, where data is disposable. This setup repo targets production environments where data must be preserved across version upgrades, so we kept pgautoupgrade.Background
/var/lib/postgresql/MAJOR/docker(ChangePGDATAin 18+ to/var/lib/postgresql/MAJOR/dockerdocker-library/postgres#1259)/var/lib/postgresql/data/var/lib/postgresqland it handles the data migration automaticallyTesting
For existing users
Existing users upgrading from PG17 need to:
Details: https://github.com/pgautoupgrade/docker-pgautoupgrade#error-message-when-mounting-data-to-varlibpostgresqldata-on-postgres-v18
Fixes #86