# tianon/docker-postgres-upgrade

a PoC for using "pg_upgrade" inside Docker -- learn from it, adapt it for your needs; don't expect it to work as-is!

Repository: https://github.com/tianon/docker-postgres-upgrade
Canonical: https://ross.abutalabs.com/products/docker-postgres-upgrade
Homepage: https://hub.docker.com/r/tianon/postgres-upgrade/
Language: Shell
License: MIT
License Family: permissive
Last push: 2026-08-13T19:22:12+00:00

## Health v2 (maintenance only)
Score: 76/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 35, longevity 100
- inputs: {"age_days": 3753, "days_push": 20, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1383, forks 128 (observed 2026-08-28T04:04:34.563894+00:00)

## What it is
A Docker image that wraps PostgreSQL's pg_upgrade tool to upgrade database data directories between major PostgreSQL versions. Tags follow an OLD-to-NEW version format and it is explicitly a proof-of-concept meant to be adapted rather than used as-is.

## Use cases
- upgrade postgres data directory from version 17 to 18 in docker
- run pg_upgrade without installing multiple postgres versions locally
- migrate dockerized postgresql database to a new major version
- in-place major version upgrade of a self-hosted postgres container
- upgrade postgres volume data using --link for faster pg_upgrade

## When to choose
- you run PostgreSQL in Docker and need a major version upgrade
- you want a minimal, adaptable pg_upgrade wrapper image
- your data directory layout can be mounted into the container

## When to avoid
- you need a fully supported turnkey upgrade tool with guarantees
- you run PostgreSQL outside Docker or on managed services
- you expect it to work unmodified for arbitrary directory layouts

## Facets
- artifact type: cli-tool
- maturity: active
- function: database, deployment, developer-tools
- domain: databases, self-hosted
- platform: cross-platform
- tags: postgresql, pg-upgrade, docker-image, database-migration, shell, devops, containers, docker, linux

## Member repositories
- tianon/docker-postgres-upgrade (main) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:34.563894+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:40:04.497491+00:00, confidence not recorded.
  - readme: https://github.com/tianon/docker-postgres-upgrade (fetched 2026-08-28T04:04:34.563894+00:00, sha 28e312eb5eb2)
  - homepage: https://hub.docker.com/r/tianon/postgres-upgrade/ (fetched 2026-08-29T11:55:49.351070+00:00, sha 513b9d1f1d19)
  - site_page: https://docs.docker.com/docker-hub (fetched 2026-08-29T11:55:49.360194+00:00, sha caaa18892709)
  - site_page: https://www.docker.com/docs (fetched 2026-08-29T11:55:49.362026+00:00, sha aeada2272712)
  - site_page: https://www.docker.com/company (fetched 2026-08-29T11:55:49.363859+00:00, sha 05ab59b2bc29)
- Data as of 2026-08-30T08:39:29.467469+00:00.
