# How are PostgreSQL upgrades handled in the container?

**URL:** <https://meta.discourse.org/t/how-are-postgresql-upgrades-handled-in-the-container/113952>\
**Category:** Self-hosting\
**Tags:** hosting\
**Created:** [April 10, 2019, 11:06am UTC](https://meta.discourse.org/t/how-are-postgresql-upgrades-handled-in-the-container/113952 "2019-04-10T11:06:14Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [August 15, 2019, 9:59pm UTC](https://meta.discourse.org/t/how-are-postgresql-upgrades-handled-in-the-container/113952/2 "2019-08-15T21:59:43Z")

</div>

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.

---

_[View the full topic](https://meta.discourse.org/t/how-are-postgresql-upgrades-handled-in-the-container/113952)._
