How are PostgreSQL upgrades handled in the container?

When self-hosting Discourse in the official docker container, how can I expect updates/upgrades of the underlying database – or Ruby on Rails, for that matter – to be handled?

I’m new to PostgreSQL, but I understand that some upgrades of it have been complicated in the past.

Ruby gets updated by providing a new base image for the container.

Postgres upgrades are more complicated, but when it’s needed, the database gets backed up, converted to the new format, and then migrated over. It mostly always works. They typically skip every other Postgres upgrade, so it’ll be a while before it happens again. (If you really care, you can look at the postgres templates in the templates directory of the discourse_docker repo.