Skip to content

Upgrade Heroku Postgres from 15 to 18 (EOL deadline: Dec 20, 2026) #613

Description

@BenBarahona

Context

Heroku notified us that PostgreSQL 15 reaches end-of-life on 2027-Jan-20 and all databases must be upgraded by 2026-Dec-20. After that date Heroku will force-upgrade to PG 18 automatically (and reserves the right to deprovision databases that aren't upgraded). We should upgrade on our own schedule rather than wait for the forced upgrade.

Affected database:

  • App: revelry-slax
  • Add-on: postgresql-corrugated-17078 (attached as DATABASE_URL / HEROKU_POSTGRESQL_CRIMSON_URL)
  • Plan: Standard 0
  • Current version: PG 15.18 (flagged "deprecating")
  • Data size: ~15 MB / 14 tables
  • Maintenance window: Thursdays 22:00 – Fridays 02:00 UTC

Target version: PG 18 (Heroku's current default; avoids another upgrade cycle soon)

Tasks

  • Verify app compatibility with PG 18 (Postgrex/Ecto versions in mix.lock; check release notes for PG 16–18 breaking changes relevant to our queries)
  • Test the upgrade first: heroku addons:create heroku-postgresql:standard-0 -a revelry-slax --fork DATABASE_URL, upgrade the fork, and run the app against it (then destroy the fork)
  • Update CI to match: .github/workflows/test.yml currently pins image: postgres:9.6, bump to postgres:18 (worth doing early to shake out compatibility issues in tests)
  • Schedule and run the production upgrade (Standard tier supports the low-downtime flow):
    1. heroku pg:upgrade:prepare DATABASE_URL -a revelry-slax --version 18
    2. Wait for the follower to be ready, then during a low-traffic window:
      heroku maintenance:on -a revelry-slax
    3. heroku pg:upgrade:run DATABASE_URL -a revelry-slax
    4. heroku maintenance:off -a revelry-slax
  • Verify: heroku pg:info -a revelry-slax shows PG 18, app boots, smoke-test core flows
  • Confirm backup schedule still active: heroku pg:backups:schedules -a revelry-slax

References

Deadline: complete before 2026-Dec-20 (Heroku forced upgrade after that date)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions