# Upgrade fails on old version of Postgres database

**URL:** <https://meta.discourse.org/t/upgrade-fails-on-old-version-of-postgres-database/103287>\
**Category:** Self-hosting\
**Tags:** unsupported-install\
**Created:** [December 2, 2018, 10:46am UTC](https://meta.discourse.org/t/upgrade-fails-on-old-version-of-postgres-database/103287 "2018-12-02T10:46:30Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![gtanczyk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gtanczyk/32/44608_2.png) [@gtanczyk](https://meta.discourse.org/u/gtanczyk)\
**Post date:** [December 2, 2018, 11:12am UTC](https://meta.discourse.org/t/upgrade-fails-on-old-version-of-postgres-database/103287/3 "2018-12-02T11:12:37Z")

</div>

Updating postgres solved the problem, however now I’m wondering if I should consider my discourse database as corrupted, since most of db migrate tasks were executed(successfully?) on 9.4, and only the last two on 9.5.

Would it be possible to detect incompatible postgres version before upgrade, in order to block admins from doing stupid things like what I just did? 🙂

---

_[View the full topic](https://meta.discourse.org/t/upgrade-fails-on-old-version-of-postgres-database/103287)._
