Postgres 18.7
All checks were successful
Deploy storage stack / deploy (push) Successful in 25s

Move the shared Postgres from 17 to 18.7 by dump and restore into a new
volume, pg_data_18, mounted at /var/lib/postgresql as the 18 image
requires (PGDATA moved to /var/lib/postgresql/18/docker). The 17 data
volume stays as it was.

Procedure (2026-11-13): restic snapshot and pg_dumpall to S3; stop
asxpio, asxpio-monitor and datacenterbingo; final pg_dumpall; deploy
this; restore the dump; compare per-table row counts; start the apps.

Rollback: revert this commit and redeploy (17.12 on the untouched
pg_data), then start the apps. Writes made on 18 in between would need
a pg_dump from 18 to carry over.

Assisted-by: Claude:opus-5-5
This commit is contained in:
Sergei Poljanski 2026-11-13 04:21:38 +04:00
commit 46b18ee2ae
Signed by: asxpi
GPG key ID: 4F8851660FA4121B

View file

@ -1,6 +1,6 @@
services: services:
postgres: postgres:
image: postgres:17-alpine image: postgres:18.7-alpine
container_name: storage-postgres container_name: storage-postgres
restart: unless-stopped restart: unless-stopped
environment: environment:
@ -8,7 +8,9 @@ services:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: postgres POSTGRES_DB: postgres
volumes: volumes:
- pg_data:/var/lib/postgresql/data # Postgres 18's image keeps PGDATA in /var/lib/postgresql/18/docker
# and refuses the old /var/lib/postgresql/data mount
- pg_data_18:/var/lib/postgresql
networks: networks:
- storage - storage
healthcheck: healthcheck:
@ -18,7 +20,7 @@ services:
retries: 10 retries: 10
postgres-init: postgres-init:
image: postgres:17-alpine image: postgres:18.7-alpine
container_name: storage-postgres-init container_name: storage-postgres-init
depends_on: depends_on:
postgres: postgres:
@ -79,7 +81,10 @@ services:
- "traefik.http.services.garage-web.loadbalancer.server.port=3902" - "traefik.http.services.garage-web.loadbalancer.server.port=3902"
volumes: volumes:
# Postgres 17's data, left untouched by the move to 18: the rollback.
# Remove once 18 has run well.
pg_data: pg_data:
pg_data_18:
garage_meta: garage_meta:
garage_data: garage_data: