Skip to content

feat(db): upgrade the prod database to PostgreSQL 18 - #516

Merged
pasibun merged 1 commit into
mainfrom
feat/db-prod-pg18
Nov 25, 2026
Merged

pasibun merged 1 commit into
mainfrom
feat/db-prod-pg18

Conversation

@pasibun

@pasibun pasibun commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Moves PostgreSQL major 18 from the test overlay to the base, so prod gets the same in-place pg_upgrade that ran on test today (#470). The test render stays the same.

  • Backups: prod archives to a new serverName, tn-don-db-prod/don-db-postgres-pg18. pg_upgrade makes a new system ID and resets the timeline to 1, and the barman-cloud plugin does not separate archives per major (CNPG docs). The PG17 archive stays as it is.
  • Pre-upgrade backup: don-db-postgres-pre-pg18-20261125 (plugin, from the standby), completed 08:01:39Z.
  • Downtime: the prod database is unavailable for some minutes, and CNPG clones the replica again afterwards.
  • After merge: take a new base backup under the new path, run ANALYZE, and smoke-test the APIs.

Move major 18 from the test overlay to the base. CNPG does an in-place
major upgrade with pg_upgrade on prod, like it did on test on 25 November
(about 4 minutes, all schemas and data intact).

pg_upgrade makes a new system ID and starts at timeline 1 again. The
barman-cloud plugin does not separate archives per major, so prod writes
to a new serverName (don-db-postgres-pg18). The PostgreSQL 17 backups,
including the on-demand backup don-db-postgres-pre-pg18-20261125, stay
under the old path for a restore.

The prod database and its apps are unavailable for some minutes. CNPG
clones the replica again after the upgrade.
@pasibun
pasibun merged commit 252705c into main Nov 25, 2026
2 checks passed
@pasibun
pasibun deleted the feat/db-prod-pg18 branch November 25, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant