benoit, French
@benoit@ruby.social avatar

Yesterday we migrated many databases to 16.2. It went smoothly for all of them except one.
The database is used by Sidekiq for 90% of the traffic. We choose a time window outside of working hours, but still we had some traffic, and we didn't turn off pods. The database was inaccessible for 10min. Jobs rescheduled, and quickly auto-scaling was triggered. I was not able to perform ANALYZE. So requests retrying at the same time + huge disk read. 💥

esparta,
@esparta@ruby.social avatar

@benoit was the upgrade from a minor version? You didn't mention it - I'm assuming yes. Usually have no problem with that.

benoit,
@benoit@ruby.social avatar

@esparta 14 to 16 so big upgrade

esparta,
@esparta@ruby.social avatar

@benoit wow. You were brave there.

Don't get me wrong, my experience told me is usually not a good idea to rely on managed databases that much, if I had full control of the servers then it may be fine, we can do dry-runs multiple times and monitor before proceeding.

When I do not have control of the server I prefer to follow what Heroku have documented:

https://devcenter.heroku.com/articles/upgrading-heroku-postgres-databases

Basically: create an upgraded follower, sync, then switch over, drop the old leader - now the follower.

ascherbaum,
@ascherbaum@mastodon.social avatar

@esparta @benoit This is not really a issue, but how RDS handles the upgrade.

I also agree that creating a new follower and populating it with logical replication is a good choice.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • PostgreSQL
  • ethstaker
  • thenastyranch
  • GTA5RPClips
  • everett
  • Durango
  • rosin
  • InstantRegret
  • DreamBathrooms
  • magazineikmin
  • Youngstown
  • mdbf
  • slotface
  • cisconetworking
  • kavyap
  • JUstTest
  • normalnudes
  • modclub
  • cubers
  • ngwrru68w68
  • khanakhh
  • tacticalgear
  • tester
  • provamag3
  • Leos
  • osvaldo12
  • anitta
  • megavids
  • lostlight
  • All magazines