Forums

Django 3.0 and Postgresql

Hi,

according to 'psql --version', my account is currently running PostgreSQL version 9.4.25.

I recently upgraded my website to the latest Django version that is 3.0.3. According to Django's 3.0 release notes,

Upstream support for PostgreSQL 9.4 ends in December 2019. Django 3.0 supports PostgreSQL 9.5 and higher.

In other words, PostgreSQL and Django don't want to play together.

Can we get a more recent version of PostgreSQL or am I stuffed?

We're planning to release a new version of Postgres as soon as we can, but we don't have an official timeline right now. Unfortunately right now that means that you can only use Django 3.0+ with MySQL, SQLite, or an external Postgres provider on PythonAnywhere :-(

I am really sorry to say that, but this starts to be a dealbreaker for me. I really love pythonanywhere, but I depend on Postgres for my Django Projects, and as Django does not support Postgres 9.4 anymore since 3.0 I (and I think not just I) am stuck on an older Version of Django. Especially as we pay extra for Postgresql we can expect, that it get's updated soon or at least an approximate Date for the Upgrade,, so we can plan around this...

The issue was known already one year ago, if not earlier

Sorry to hear that.

I hope you update it as well... )

We are actually working on that ticket right now! Expect something out within the coming months.

Also would really love that update to be made. Any idea of the timeline? If it takes too long I might need to move to another platform which would be a huge bummer since I LOVE PythonAnywhere so much and have been advertising for it. Also anyone new to Django but want to actually put something in production will probably start a project with Django3, realize you don't support it with Postgres by the time they come to launch their web app and might prefer using another service instead. Please make this update!

Also anyone new to Django but want to actually put something in production will probably start a project with Django3, realize you don't support it with Postgres by the time they come to launch their web app and might prefer using another service instead.

Here I am, just completed development of my first django app, developed all with django 3.0 and postgresql as suggested by the documentation. I thought of PythonEverywhere as my perfect match, but clashed with this issue and now i am really not sure wether to downgrade whatever i have to in the project or change service. :/

The Postgres upgrade will definitely be in our next system update; the initial coding is done, and it's going through our testing system now. But unfortunately in the meantime the only workaround is to use Django < 3.0 :-(

I am facing an error in no django-admin which I believe is due to postgres 9.4.25. Do you know when we will have the update to 9.5?

It will be in our next system update, which we hope to release within the next week or so.

This is the next week we were waiting for but we still have no updates on PostgreSQL 9.5... I really want this update for my project

After our system update yesterday, all newly-created Postgres databases use version 12. We do have a script to migrate existing databases over from 9.4 to 12, which we will start using on request next week once we're sure that version 12 is running well. If you'd like your database to be migrated, you can email us to arrange a time -- we can do times between 12 noon and 6pm, Monday to Friday.

One Single Word: Awesome!

Superb! You should advertise it lol! Most web shared hosting are still on PostgreSQL 9.4...

Heh, maybe we should :-)

Hi Giles, awesome, and could I get my database migrated to the latest postgres version too as I'm having the same problem

Sure. Do you have any preference for when to do it? We can do it Monday to Friday 10-18 UTC.

Can I do it now?

Could a staff member move me to the latest Postgres version? Anytime is fine and its fine if it wipes any data in there. I sent an email to support just now as well. I am running into the same issue when I moved to Django 3.x. My database has already been wiped and im stuck on a migration error because of the dropped support for 9.4.

Though I am glad I ran into this because it seems Postgres has a Severe issue: CVE-2020-25695 affecting even more recent versions than 9.4 which is good to know.

And it is mentioned on the Postgres homepage that everyone should upgrade as soon as possible.

The PostgreSQL Global Development Group has released an update to all supported versions of our database system, including 13.1, 12.5, 11.10, 10.15, 9.6.20, and 9.5.24. This release closes three security vulnerabilities and fixes over 65 bugs reported over the last three months.

Due to the nature of CVE-2020-25695, we advise you to update as soon as possible.

Additionally, this is the second-to-last release of PostgreSQL 9.5. If you are running PostgreSQL 9.5 in a production environment, we suggest that you make plans to upgrade.

@chrisrh Looks like we already talk over support email.

We sure did. Thank you! I appreciate the fast response. :)

Could I please be upgraded also :)

Sure! As this will require some downtime on your Postgres instance, it's probably best to coordinate over email -- drop us a line at support@pythonanywhere.com with the timing you'd prefer, and we can get that started. We can do times between 11am and 5pm UTC, Monday to Friday, or if you don't really care when the downtime is, just let us know and we'll do it as soon as we have a chance.

Thanks for sorting that out! :)

Glad to hear that it worked for you!