operations icon indicating copy to clipboard operation
operations copied to clipboard

Plan API database PostgreSQL upgrade

Open pnorman opened this issue 4 years ago • 4 comments

Tracking issue because this will involve a downtime during the transition.

Rough plan:

  • Test rails port and cgimap against latest PostgreSQL on the dev server
  • Upgrade one of the DB read-only replicas
  • Switch read-only traffic to the replica
  • Bring site into read-only mode
  • Switch primary DB server to the replica
  • Bring site into online mode
  • Upgrade replicas

pnorman avatar Jun 30 '21 14:06 pnorman

I would propose to also include osmdbt for minutely diffs in the test. Maybe also planet-dump-ng.

mmd-osm avatar Jun 30 '21 14:06 mmd-osm

Argh. I thought I was dealing with this. I still haven't got around to doing my tests so we're not ready to progress this yet and I probably still have the "how to" plan from last time somewhere.

The dev server has been running an up to date postgres for some time so rail, cgimap, osmdbt etc are all tested already.

tomhughes avatar Jun 30 '21 14:06 tomhughes

That plan doesn't work by the way - you can't do one server at a time. You have to take everything down and do a big bang - upgrade the primary and then do each secondary before you restart replication if memory serves me correctly.

tomhughes avatar Jun 30 '21 14:06 tomhughes

Found my plan from the last attempt: https://github.com/openstreetmap/operations/issues/94#issuecomment-284243528

tomhughes avatar Jun 30 '21 15:06 tomhughes

Plan is for downtime on Sun Jan 22nd

pnorman avatar Dec 18 '22 12:12 pnorman

This upgrade has been completed.

tomhughes avatar Jan 22 '23 12:01 tomhughes