pg_upgrade toolbox: PostgreSQL 8.2-18 binaries (with extensions) in one image
1.6K
epicmorg/pg-upgrade-toolA one-shot toolbox for major PostgreSQL upgrades with pg_upgrade: every PostgreSQL major from
8.2 to 18 (PGDG packages on epicmorg/debian:trixie) is installed side by side in
/usr/lib/postgresql/<major>/bin, together with the same extension set as
epicmorg/postgres
(PostGIS, TimescaleDB, system_stats, ...) so that pg_upgrade --check finds the extensions on both
sides, plus pgloader.
Example: upgrade an 11 cluster to 16.
docker run --rm -it \
-v /path/to/old/pg11_data:/var/lib/postgresql/11/data \
-v /path/to/new/pg16_data:/var/lib/postgresql/16/data \
-u postgres \
epicmorg/pg-upgrade-tool:latest
/usr/lib/postgresql/16/bin/initdb -D /var/lib/postgresql/16/data --locale=en_US.UTF-8 -A md5
/usr/lib/postgresql/16/bin/pg_upgrade \
-b /usr/lib/postgresql/11/bin \
-B /usr/lib/postgresql/16/bin \
-d /var/lib/postgresql/11/data \
-D /var/lib/postgresql/16/data \
--check
--link)/usr/lib/postgresql/16/bin/pg_upgrade \
-b /usr/lib/postgresql/11/bin \
-B /usr/lib/postgresql/16/bin \
-d /var/lib/postgresql/11/data \
-D /var/lib/postgresql/16/data
epicmorg/postgres:16 containerdocker exec -d postgres-16 vacuumdb --all --analyze-in-stages -U postgres
Copy your postgresql.conf / pg_hba.conf changes to the new cluster before starting it.
| Tags | Dockerfile |
|---|---|
latest | . |
Every tag is pushed to docker.io, quay.io and ghcr.io (epicmorg/pg-upgrade-tool:<tag> on each) - same digest everywhere.
Content type
Image
Digest
sha256:f37bc7a83…
Size
2.7 GB
Last updated
5 days ago
docker pull epicmorg/pg-upgrade-tool