I've been using Amazon RDS instances for Postgres databses for a while, but I haven't had to do a lot of upgrading on large databases until recently. I hit an issue where one database was hundreds of gigs large. The upgrade never completes because the instance is oom killed. I've been reading a lot on the AWS website about common practices for upgrading databases major versions , but I haven't seen anything about large databases oom killing the process and how to avoid.
I believe at least one of our databases on this instance have the potential to eventually get up to 500 gigs or so. Obviously scaling instances vertically to that much memory isn't a great solution (and probably doesn't exist). Also, scaling horizontally JUST for memory to upgrade doesn't seem to be a good approach. What is the normal way to handle this?