# Upgrade mislukt: PostgreSQL versie 13 ... niet compatibel met ... versie 10.12

**URL:** <https://meta.discourse.org/t/upgrade-failed-postgresql-version-13-not-compatible-with-version-10-12/187201>\
**Category:** Self-hosting\
**Created:** [17 april 2021 om 13:58 UTC](https://meta.discourse.org/t/upgrade-failed-postgresql-version-13-not-compatible-with-version-10-12/187201 "2021-04-17T13:58:05Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![ThePythonicCow](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thepythoniccow/32/217413_2.png) [@ThePythonicCow](https://meta.discourse.org/u/ThePythonicCow)\
**Post date:** [17 april 2021 om 13:58 UTC](https://meta.discourse.org/t/upgrade-failed-postgresql-version-13-not-compatible-with-version-10-12/187201/1 "2021-04-17T13:58:05Z")

</div>

I have a little forum, [themooster.net](http://themooster.net), based on Discourse that I had not upgraded in a couple of months.

I clicked “Update” in the “Admin” recommendation to upgrade, and it said I had to do the upgrade at the shell prompt instead, and gave me three lines to run:

```
    cd /var/discourse
    git pull
    ./launcher rebuild app

```

I ran those three commands. The “rebuild app” failed initially, because I didn’t have 5 GByte free on my little linode box, so I added more disk space and the “rebuild app” seemed to complete ok.

But the site didn’t come back up.

I looked around, rebooted, still not coming up, looked around a bit more.

Seems that the frontend nginx is coming up ok, but when I try to access my forum over the web, like a normal user, I get a " 502 Bad Gateway" error from the nginx frontend.

The file “/var/discourse/shared/standalone/log/var-log/postgres/current” is filled with errors such as:

2021-04-17 13:54:37.785 UTC [7095] FATAL: database files are incompatible with server  
2021-04-17 13:54:37.785 UTC [7095] DETAIL: The data directory was initialized by PostgreSQL version 13, which is not compatible with this version 10.12 (Debian 10.12-2.pgdg100+1).

I have good backups of the forum in my directory:  
/var/discourse/shared/standalone/backups/default

Now what should I do?

---

_[View the full topic](https://meta.discourse.org/t/upgrade-failed-postgresql-version-13-not-compatible-with-version-10-12/187201)._
