Skip to content

Find why the collab database upgrade fails, then move off PostgreSQL 14 #728

Closed

Description

@HMarzban

Summary

The collab database still runs PostgreSQL 14.24. PostgreSQL 14 reaches end of life on 2026-11-12 (versioning policy). An in-place upgrade to 15 failed on 2026-11-11, and the console gave no reason. This issue finds the cause, then upgrades the cluster at a time we choose.

What happened on 2026-11-11

  • The maintainer opened Version Upgrade in the DigitalOcean console and picked PostgreSQL 15. The console offers 15, 16, 17 and 18.
  • The check said Cluster Check found no issues - Safe to install.
  • The upgrade then stopped with Upgrade was not successful. This did not affect your existing database cluster.
  • Later the same day, the maintainer moved the cluster from NYC1 to LON1 in place, on the same plan. The move does not change the version.

Why it matters

  • DigitalOcean applies required upgrades in the cluster's upgrade window: Wednesday 04:30Z to 08:30Z. The next one is 2026-11-18. DigitalOcean has published no PostgreSQL 14 end-of-life note yet.
  • Its guide says a major upgrade runs "in place on the primary node", with downtime "that can last longer than a routine maintenance update". It has "a small risk of data loss in case of a crash", and it cannot be undone (upgrade guide).
  • The cluster is primary only, and it holds 8 databases. All of them upgrade together.

What to do

  1. Ask DigitalOcean support why the upgrade failed. Give the time of the try and both console messages.
  2. Fix what support names. The cause is not known yet.
  3. Fork the cluster and upgrade the fork first, as the guide advises. Point a local backend at the fork and open one large pad.
  4. Upgrade production after 20:00Z, when traffic is lowest.

Decisions

  1. Target version. Recommended: 17. Production Supabase also targets 17 (Upgrade Supabase Postgres from 15.8.1.073 to 17 #322). DigitalOcean users report that some extensions are not on 18 yet.

Check

  • select version(); returns the new version.
  • An outside probe of /health/database every 15 s records the downtime. State it in the closing comment.
  • The worker-job-failures rule stays Normal, and no store job lands in the dead-letter queue.

Acceptance criteria

  • The support answer, or the cause found on the fork, is in a comment.
  • The fork upgrade passes before production is touched.
  • Production runs the new version, and the downtime is recorded.

Related

Activity

  1. added this to the v2.3.6 milestone on Nov 11, 2026
  2. HMarzban commented on Nov 11, 2026

    @HMarzban
    CollaboratorAuthor

    Measured, 2026-11-11: done on PostgreSQL 18.6, in London

    The maintainer relocated the cluster from NYC1 to LON1 in place, then upgraded it to PostgreSQL 18 in the console. The upgrade succeeded after the move. The cause of the earlier failure in NYC1 stays unknown.

    • Version: postgres-exporter reports PostgreSQL 18.6. The hostname did not change, so the app needed no config change.
    • Outages: the app logged short database outages at 08:08:39Z, 08:10:26Z, 08:17:54Z, 08:23:45Z, 08:27:19Z, 08:29Z and 08:30Z. The last error line is at 08:30:56Z. An outside probe of /health/database every 15 s saw 4 single 503 answers.
    • No lost work: in the 45 minutes to about 08:32Z, every queue had 0 failed jobs, document_persist_fallback_total rose by 0, and every dead-letter queue stayed empty.
    • Round trip: 200 sequential select 1 from inside a rest-api container, with the app's own connection settings: p50 0.37 ms, p99 0.61 ms. In NYC1, /health/database had p50 72.6 ms over 2026-11-09 20:17Z to 2026-11-11 08:08Z. The two methods differ, so the 24-hour and 7-day London reads of /health/database will give the like-for-like number.

    Not done from the plan above: the fork test. Still open: the first backup on PostgreSQL 18. The console said read-only nodes need "at least one backup".

    Closing, because the end-of-life risk is gone.

  3. added a commit that references this issue on Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions