Skip to content

Update Postgres to 15.20 - #135

Merged
sir-sigurd merged 2 commits into
mainfrom
sergey/postgres-15.20
Dec 1, 2026
Merged

sir-sigurd merged 2 commits into
mainfrom
sergey/postgres-15.20

Conversation

@sir-sigurd

Copy link
Copy Markdown
Member

The need

The module runs the registry's database on PostgreSQL 15.18. RDS released 15.20 on 2026-11-26, and its PostgreSQL release calendar ends standard support for 15.18 in September 2027 and for 15.20 in March 2028. 15.19 and 15.20 also carry PostgreSQL's August and November 2026 security fixes. This is routine maintenance, not a hotfix.

What changed

The module creates the database on PostgreSQL 15.20, and upgrades an existing one in place on the first terraform apply after its root moves ref to a release carrying this change. The module sets apply_immediately = true and auto_minor_version_upgrade = false, so that apply upgrades the instance at once rather than in the maintenance window, and the restart cuts the registry off from its database until it finishes. The CHANGELOG's release notice says so.

Verification

Nothing has been applied to a live database yet, so the upgrade itself is unverified until a consumer moves its ref to a release that contains it.

RDS lists 15.20 as available in us-east-1, us-west-2, eu-central-1 and us-gov-west-1, and as a valid upgrade target from 15.18 (aws rds describe-db-engine-versions, 2026-12-01; other regions unchecked). To check another region: aws rds describe-db-engine-versions --engine postgres --engine-version 15.20 --region <region>.

CI's own commands pass locally at Terraform 1.10.0: terraform fmt -check -recursive -diff, terraform validate in each module, terraform test in modules/vpc and modules/quilt/tests/smoke, and markdownlint. The smoke test plans the database against a mocked provider, so it does not check the engine version against RDS.

Links

No issue tracks this. A paired change to the CloudFormation template moves the database that template creates to 15.20.

Risk and rollback

The restart. During the apply that upgrades the instance, the registry cannot reach its database until the restart finishes. No duration was measured. An operator picks the moment by picking when to apply.

Post-upgrade steps. The 15.19 and 15.20 release notes recommend REINDEX of btree indexes on bpchar columns, GIN indexes, pg_trgm GiST indexes and indexes made with btree_gist or ltree, none of which the registry's schema has. 15.19's pgcrypto change touches only pgcrypto users, and the registry's only extension is citext. Its logical-decoding change touches only an instance with logical decoding turned on through the rds.logical_replication parameter, and the module leaves the instance on RDS's default parameter group. 15.20's notes also recommend REINDEX of a TOAST-table index that reports "missing chunk number" errors after a REINDEX CONCURRENTLY, a repair for that symptom rather than a step to run on upgrade.

Rollback. Before any consumer applies it, reverting this pull request is enough. After an apply, reverting the pin does not bring the database back: RDS cannot revert an upgraded instance to its earlier engine version, and returning to 15.18 means restoring a snapshot taken before the upgrade into a new database (RDS for PostgreSQL upgrade considerations).

The optionality note

The database stays on PostgreSQL 15, so a later major-version upgrade is as open as before. Once a database is upgraded, an in-place return to 15.18 is closed.

TODO

  • CHANGELOG entry
  • I promise to deploy to dev stacks (including nightly) soon after PR is merged so we really have these changes tested

🤖 Generated with Claude Code

sir-sigurd and others added 2 commits December 1, 2026 14:43
RDS released 15.20 on 2026-11-26. Standard support ends in September
2027 for 15.18 and in March 2028 for 15.20. The CHANGELOG link carries
a placeholder until the pull request has a number.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sir-sigurd
sir-sigurd marked this pull request as ready for review December 1, 2026 17:09
@sir-sigurd
sir-sigurd requested a balanced review from Copilot December 1, 2026 17:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The RDS upgrade immediately causes downtime and cannot be downgraded in place, requiring live dev-stack validation and operator confirmation of recovery readiness beyond mocked CI plans.

No open issues 🎉

What changed in this PR

Updates the Terraform database module from PostgreSQL 15.18 to 15.20 as routine maintenance for the registry database.

Changes:

  • Pins the RDS PostgreSQL engine version to 15.20.
  • Adds a release notice explaining that the upgrade runs during terraform apply and interrupts registry database access while the instance restarts.
File Description
modules/​db/​main.tf Updates the PostgreSQL engine pin to 15.20.
CHANGELOG.md Records the version update and warns about restart downtime.

Review effort: Balanced

@greptile-apps

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5 · The PR appears safe to merge, with the database restart explicitly documented.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with the database restart explicitly documented.

Reviews (1) · Last reviewed commit: "Add PR number to CHANGELOG" · Reviewed by Greptile

@sir-sigurd
sir-sigurd merged commit 3682fd3 into main Dec 1, 2026
12 checks passed
@sir-sigurd
sir-sigurd deleted the sergey/postgres-15.20 branch December 1, 2026 17:37
@sir-sigurd sir-sigurd mentioned this pull request Dec 1, 2026
1 of 2 tasks
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.

2 participants