From feb7237f68c5a574d86cc00964fb8d8fc661962d Mon Sep 17 00:00:00 2001 From: snickerjp Date: Wed, 1 Jul 2026 22:02:16 +0900 Subject: [PATCH 1/4] Upgrade PostgreSQL to v18 with updated volume mount path - 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 #86 --- data/compose.yaml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/data/compose.yaml b/data/compose.yaml index a2dab484..21fdb61d 100644 --- a/data/compose.yaml +++ b/data/compose.yaml @@ -38,14 +38,22 @@ services: image: redis:7-alpine restart: unless-stopped postgres: - # [IMPORTANT] - # We intentionally fix the version to v17 to avoid automatic upgrade to v18 (or later). - # If you want to upgrade to v18, please refer to the official upgrade guide: - # https://github.com/pgautoupgrade/docker-pgautoupgrade#one-shot-mode - image: pgautoupgrade/pgautoupgrade:17-alpine + # pgautoupgrade handles automatic PostgreSQL major version upgrades. + # + # [NOTE FOR EXISTING USERS] + # If upgrading from PG17 or earlier, the volume mount path has changed. + # Backup your data first, then stop containers and update your volume from: + # /opt/redash/postgres-data:/var/lib/postgresql/data + # to: + # /opt/redash/postgres-data:/var/lib/postgresql + # + # pgautoupgrade will automatically migrate your data to the new directory structure. + # + # Details: https://github.com/pgautoupgrade/docker-pgautoupgrade#error-message-when-mounting-data-to-varlibpostgresqldata-on-postgres-v18 + image: pgautoupgrade/pgautoupgrade:18-alpine env_file: /opt/redash/env volumes: - - /opt/redash/postgres-data:/var/lib/postgresql/data + - /opt/redash/postgres-data:/var/lib/postgresql restart: unless-stopped nginx: image: redash/nginx:latest From 8b2c36245730376c122b709dfaa8cb9b0bec1a37 Mon Sep 17 00:00:00 2001 From: snickerjp Date: Wed, 1 Jul 2026 22:02:22 +0900 Subject: [PATCH 2/4] Add FAQ entries for PostgreSQL backup and major version upgrade - 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 --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index d206f384..82ea0a1f 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,19 @@ Redash for redundancy. You will also need to tweak the number of workers based o See [Upgrade Guide](https://redash.io/help/open-source/admin-guide/how-to-upgrade). +### How do I backup my PostgreSQL database? + +``` +docker compose -f /opt/redash/compose.yaml exec -T postgres pg_dumpall -U postgres > backup-$(date +%Y%m%d).sql +``` + +### How do I upgrade PostgreSQL to a newer major version? + +If you are running PostgreSQL 17 or earlier and want to upgrade to PostgreSQL 18, you need to update the volume mount +path in your `/opt/redash/compose.yaml`. See the +[pgautoupgrade documentation](https://github.com/pgautoupgrade/docker-pgautoupgrade#error-message-when-mounting-data-to-varlibpostgresqldata-on-postgres-v18) +for details. + ### How do I use `setup.sh` on a different operating system? You will need to create a docker installation function that suits your operating system, and maybe other functions as From c42a79f888fb974de42c36105283714e529996d2 Mon Sep 17 00:00:00 2001 From: snickerjp Date: Wed, 1 Jul 2026 22:20:59 +0900 Subject: [PATCH 3/4] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 82ea0a1f..7eea58f7 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ See [Upgrade Guide](https://redash.io/help/open-source/admin-guide/how-to-upgrad ### How do I backup my PostgreSQL database? ``` -docker compose -f /opt/redash/compose.yaml exec -T postgres pg_dumpall -U postgres > backup-$(date +%Y%m%d).sql +# docker compose -f /opt/redash/compose.yaml exec -T postgres pg_dumpall -U postgres > backup-$(date +%Y%m%d).sql ``` ### How do I upgrade PostgreSQL to a newer major version? From ded5201ac5d5cf1cee940828a3194cceb98d56c9 Mon Sep 17 00:00:00 2001 From: snickerjp Date: Wed, 1 Jul 2026 22:25:20 +0900 Subject: [PATCH 4/4] Clarify pgautoupgrade comment: upgrades require explicit tag change Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- data/compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/compose.yaml b/data/compose.yaml index 21fdb61d..5482d193 100644 --- a/data/compose.yaml +++ b/data/compose.yaml @@ -38,7 +38,7 @@ services: image: redis:7-alpine restart: unless-stopped postgres: - # pgautoupgrade handles automatic PostgreSQL major version upgrades. + # pgautoupgrade can perform PostgreSQL major version upgrades when you update this image tag to a newer major version. # # [NOTE FOR EXISTING USERS] # If upgrading from PG17 or earlier, the volume mount path has changed.