Ops: upgrade PostgreSQL 16 → 18

Aperta
#300 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
Più di una settimana
Idoneità per principianti
22/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
django, docker, postgresql
Ambito
databases, devops

Direzione di ricerca

Start with the image tags in docker-compose.yaml and docker-compose.test.yaml, which pin postgres:17-alpine, and the Portainer stack in deployment/portainer/docker-compose.portainer.yaml. Confirm the production version and extensions on the host, then rehearse the 16-to-18 upgrade on a staging copy and run manage.py migrate plus the test suite. Done means production reports PostgreSQL 18.x and the API, Celery and Channels paths work; this needs production access, so it is not a good first task.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Goal

Upgrade production (and align dev) PostgreSQL from 16 to 18 with minimal downtime and a verified rollback path.

Context

Suggested approach

  1. Prerequisite: automated backups in place (see separate backup ticket) + fresh manual dump before upgrade.
  2. Staging: upgrade staging clone 16→18; run full test suite + smoke (migrate, ingest, admin).
  3. Production: pg_upgrade or dump/restore — pick based on data size and downtime budget.
  4. Update image tags / Portainer env / any CI test DB image to postgres:18-alpine (or pinned minor).
  5. Post-upgrade: VACUUM / analyze, verify extensions, connection pooling (if any).

Scope

  • Inventory PG version, extensions, and data directory layout on prod host
  • Document upgrade runbook (steps, estimated downtime, rollback = restore from backup)
  • Execute on staging; record issues
  • Production maintenance window + upgrade
  • Bump dev/test compose images to 18 for parity
  • Update deployment docs

Risks

  • Major version jump (16→18): use PostgreSQL upgrade docs; test pg_upgrade on copy first.
  • Meshflow migration history: run manage.py migrate after upgrade on staging.

Acceptance

  • Production SELECT version(); reports PostgreSQL 18.x
  • Meshflow API, Celery workers, and Channels/WebSocket paths operate normally post-upgrade
  • Dev compose references Postgres 18 (or documents intentional lag)
Lingua principale
Python
Stelle
1
Fork
0
Merge medio
1g 20h
PR unite (30g)
5

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pskillen/meshflow-api

Tutte le issue di pskillen/meshflow-api

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.